Compare commits

...

1741 Commits

Author SHA1 Message Date
Uladzimir Havenchyk
39a68def7e cleanup sandboxing 2025-10-30 22:30:51 +03:00
Uladzimir Havenchyk
3da641ba00 fix typecheck 2025-10-29 16:15:09 +03:00
Uladzimir Havenchyk
91247c3be2 Merge remote-tracking branch 'origin/nmezzopera/test-pyodie' into test-python-be 2025-10-29 16:03:16 +03:00
Uladzimir Havenchyk
ed4f399a01 add a comment 2025-10-28 18:49:55 +03:00
Uladzimir Havenchyk
a291c967c7 improve sandboxing 2025-10-28 18:49:12 +03:00
Uladzimir Havenchyk
4f1dec3ce8 add a comment 2025-10-28 16:42:41 +03:00
Uladzimir Havenchyk
f6347c776d log python error 2025-10-28 16:42:25 +03:00
Uladzimir Havenchyk
ae3c2c7a2a move mocks to proper place 2025-10-28 16:40:03 +03:00
Uladzimir Havenchyk
3a985e46a2 lint 2025-10-28 16:13:18 +03:00
Uladzimir Havenchyk
ba2ae00dac fix typecheck 2025-10-28 14:28:01 +03:00
Uladzimir Havenchyk
0df6adcc51 remove duplicated button 2025-10-28 14:20:52 +03:00
Uladzimir Havenchyk
87c2392827 Merge remote-tracking branch 'origin/master' into nmezzopera/test-pyodie 2025-10-28 13:32:00 +03:00
Riley Thompson
0760630f10 Fix databricks multi-level-schema-wanted-catalogs-test (#65073)
* use schema inclusion filters

* fix test

* remove set dep
2025-10-27 23:16:02 +00:00
Noah Moss
27a078faf0 Move honeysql helper to simplify module dependencies (#64689)
* init branch

* FE - add codemirror diffing, add diff support to native query editor, fake a proposed query

* Add /ee/metabot-tools/get-transforms endpoint

Returns a sequence of all python or native query transforms.

BOT-391 [Backend] Create transform index tool API

* Add test that get-transforms does not include non-native MBQL transforms

* Add /ee/metabot-tools/get-transform-details endpoint

* allow opening metabot on transforms admin pages

* use transforms_codegen profile for metabot on transforms page

* send transform in context

* show metabot on edit + create transforms page

* accept tranform suggestions from metabot

* Cleanup malli schemas for get-transforms and get-transform-details

* add transform context on edit query page

* use transforms instead of data queries

* Parse out tables from transforms in metabot user context

* wip on creation flow

* hack in a message to metabot on save

* quick fix preview error not displaying correctly

* misc. fe improvements

* fix transform context on subsequent edits for the same transform

* half hacky way to use current editor state for context in transform editing

* Switch /ee/metabot-v3/get-transforms from :get to :post

This endpoint doesn't expect args of it's own in the body, but does accept the standard metabot conversation_id that
it echoes back.

* Show 'Apply Changes' button when a transform change is generated by the agent

* handle new transforms better

* Ensure we have a fallback for context items that don't have SQL to parse

* persist diff of transform to the conversation history

* temp - make metabot always visible on transforms admin pages

* Change button label to "Proposed changes to <transform>"

* copy change for create transform buttons in chat

* better hidden message ui

* hack - better emtpy convo text

* hide suggested prompts

* Add basic snippets tools

* ensure proposed queries go through nativeQuery.setQueryText so that template tags are parsed

* better todos

* even better todo list ui

* crude sidebar ui for query transforms diffs

* better suggestion chat ui

* good'nuff @mentions

* debug logging for search table bug

* further logging

* Ensure we parse template tags for transform edits in Metabot sidebar (#64001)

* cleaner, more copy/pastable, better flowing @mentions in metabot

* Fix metabot get-transforms api test to :post not :get

* Update metabot tools test with basic python transform tests

* Ensure transform :source and :target keys get snake cased when returned from metabot tool apis

* Add get-transform-python-library-details metabot tool api endpoint

* Enhance context with :used_tables for python transforms

* surface transforms in @-mention search

* some type fixes

* python FE progress

* python fe improvements + edit experience now works

* clear proposed on cancel

* fix accept in sidebar not saving

* better diff colors

* smaller todos

* cleaner code for todos

* improve ranking of transforms in search by hardcoding a last_viewed_at time in user-recency-expr

* first pass at nested @mentions

* Conditionally add transforms to model->db-model

* Add transforms-python to module deps for metabot

* Move native-query-transform? into transforms.util and re-use existing utils

metabot-v3.tools.transforms defined a couple of helper functions that were nearly identical to ones that have since
been added to transforms.util ns. Move some things around and make use of the existing transforms.util predicates,
which are now exported from the module's core namespace.

* lots of fe clean up

* prevent rewinding conversation for admin pages

* @mention solution that plays nicely with documents

* fix search bug

* fix type issues and few small feedback things

* Add transforms to search for Metabot (#64134)

* index transforms content

* Add support for transforms & query search in metabot search tool API

* fixup whitespace

* update to use new :fields syntax

* Fix up serach-native-query malli types

* Fix the 15-day interval for transforms to be db-agnostic

* move engine loading to metabase.search.init to break circular dep

* fix kondo

* Revert "Fix the 15-day interval for transforms to be db-agnostic"

This reverts commit 11b34e4cd4a8a5a0cf8041a1d82d487ed8c81025.

* add transform to set of appdb scorer models; unrevert db type fix

* fix kondo

* implement requisite multimethods for transforms not to error in in-place search engine

* ensure we enforce metabot/unknown contexts for transforms in in-place search backend as well

* fix filter test

* transform->postprocess to reduce naming ambiguity; add a basic transform ingestion test

* add a metabot result postprocessing test

* add transforms scoring test

* expand ingestion tests

* fix tests + kondo

* address feedback

* make suggestion models configurable for a Metabot instance

* fix @mention recents in documents, update suggestion sidebar component to not accept / reject items + calculate isViewing better

* quick fixes

* for rye guy

* Handful of fixes for transforms search (#64287)

* Add both search and search_v2 endpoints, and fix bug with search-native-query option

* add a docstring

* add a basic unit test for search-native-query option

* address comments

* better state management for suggested transofrms, move css around, clean up suggestion message code

* Update the list of source tables in Python editor when metabot changes it (#64258)

If metabot proposes changes to the list of input tables for a Python transform, update the PythonDataPicker component
to keep it in sync with the text of the transform source.

* python tables reference fix

* bug fixes and better state organization

* better draft support

* fix types

* add on leave modal, clear transforms on route leave, calc dirty state, fix onChange but for native query editor, better logic for showing cta text for transform suggestions

* Ensure transforms get deleted synchronously from the search index (#64382)

* Delete transforms from search index in t2/define-before-delete

* kondo

* fix up tests

* Stop pretending to snake_case transform source and target keys

The malli schemas were wrong, so these weren't actually getting snake_cased anyway.

See also:

https://github.com/metabase/ai-service/pull/387#discussion_r2414569482

* Fix failing test & kondo warning

* Add transforms dependency check API for metabot (#64542)

* WIP - add dependency check API for metabot

* omit bad_cards for now

* update return format

* add tests

* Fix fn call

* revert unneeded refactor

* Fix search transform-ingestion-test to use mt/native-query

* switch test to mt/native-query

* Fix module usage test

* fix up tests to use lib/native-query instead

* try to fix last test

* switch native-query-transform? to use lib.query/native?

* more mbql 5/metabase lib updates

* revert the 1-pixel fix

* Subtract a pixel when computing metabot chat filler height to avoid scrollbar flicker (#64690)

* Fix MetabotAgentSuggestionMessage only show "create" for new transforms (#64598)

https://metaboat.slack.com/archives/C09CR3MT1KR/p1760034396345789

* Surface broken cards from Metabot dependencies check API (#64781)

* fix missing sidebar diff after mbql5 change

* surface broken cards

* add test

* fix kondo

* remove unused code

* Fix up dep check question terminology & schema

* fix up test

* fix up another test

* address feedback

* Update the transform source schema to use ::queries.schema/query

* remove unused require

* address FE feedback

* fix modules config test

* @mentions tests and improvements

* couple of e2e tests fixes

* prevent leave confirmation when saving

* fix most of unit tests

* add back searchable models in metabot @mentions

* More tests for transform search + transform dependencies tool, and some new future-proofing read checks (#64896)

* add some future-proofing read checks to transform deps checks + related tests

* add some more transform search tests

* remove 404 check; move read check later in impl

* convert from toucan transform instance to metadata

* clean ns

* Move honeysql helper to simplify module dependencies

* fix more function calls in tests

* fix more calls

* fix (hopefully) last two calls

* kondo fix

* fix module config

* Fix detection of requires in threading macros

* Add metabase.driver.sql.query-processor back as a driver API namespace

* Add tests for metabot tools snippets and check-transform-dependencies endpoints (#64894)

* Add tests for metabot tools snippets API endpoints

* Add test for metabot tools check-transform-dependencies endpoint

* Remove trailing blank line to appease linter

* copy over appdb implementations of add-interval-honeysql-form to h2x; add back the sql.qp version for other drivers

* switch other driver methods back to sql.qp

* update relevant callsites

* move some test logic

* fix up error

* restore :added meta

* fix tests, move over one more pg timestamp helper

* oops, update callsites

* make function public

* add MetabotChatEditor.unit.spec.tsx

* add links.unit.spec.ts

* add AIMarkdown.unit.spec.tsx

* add MetabotAgentTodoMessage.unit.spec.tsx

* add MetabotAgentSuggestionMessage.unit.spec.tsx

* add metabot/state/reducer.unit.spec.ts w/ tests for suggested transforms state

* add e2e test coverage for create + update flow for both native sql + python transforms

* FE pr feedback and lint fix

* unit test fixes

* fix search test

* add temp metabot toggle button in admin nav

* fix a couple of failing FE tests

* attempt fix ci flake issue with metabot.unit.spec.tsx

* remove metabot-only restriction on transform search

* remove redundant logs in transform api endpoints to address ngoc's comment

* fix a number of transform search tests

* fix another test

* fix hopefully last search test

* bot feedback

* bot feedback

* fix function name

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Mihael Konjevic <konjevic@gmail.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-10-27 21:53:34 +00:00
Nemanja Glumac
3177f079e8 Upgrade Mantine to v8.3.5 (#65050)
This commit removes our custom Mantine hooks patch because it was resolved upstream.
See: https://github.com/mantinedev/mantine/pull/8189
2025-10-27 21:13:25 +01:00
Nemanja Glumac
49c0589aa8 Remove mage tests from the core classpath (#65046) 2025-10-27 21:06:08 +01:00
William
57afac78ba Make native validation allow using current-level aliases in other clauses (#64701)
Make native validation allow using current-level aliases in other clauses

`select a as b from table where b > 1` wasn't passing validation because the b alias wasn't in scope in the where.
This should now be fixed.

Also, native validation keeps more context when generating references, which should allow for better error messages.
2025-10-27 19:15:57 +00:00
Nick Fitzpatrick
1fed0f701c Dark mode day 4 patch (#64996)
* document resize handles

* metrics background color

* update command palette, account profile to use new form components

* fixing button variant

* fix e2e
2025-10-27 18:58:44 +00:00
Nathan Voxland
e9950fdc21 Additional error handling in appdb reindexing (#65013) 2025-10-27 13:06:02 -05:00
Nemanja Glumac
02f7a885ee Bring back the inlined explicit deduplicate command to postinstall (#65058) 2025-10-27 17:05:41 +01:00
Nemanja Glumac
3def5f4ca9 Fix frontend coverage workflow (#65048)
Instrumentation adds a lot of overhead. Unfortunately, even 30 seconds timeout wasn't enough for some of our unit tests. We're doubling that value in order to minimize the chances of this workflow halting/failing again.

* Add workflow_dispatch trigger

* Rename workflow to 'Frontend Test Coverage'
2025-10-27 09:27:34 -06:00
Nemanja Glumac
fcd7a98745 Do not include already patched libraries in node_modules cache (#65052) 2025-10-27 14:49:59 +01:00
Phoomparin Mano
b025a5bfb7 Add horizontal padding on embedding hub when shown in homepage (#65051) 2025-10-27 20:27:13 +07:00
Phoomparin Mano
02467bd231 Design updates for static and interactive embedding settings (#64930) 2025-10-27 08:45:03 +00:00
Nemanja Glumac
ba60e617ba Temporarily patch the broken FE unit test that times out (#65027) 2025-10-27 09:36:29 +01:00
Nemanja Glumac
7738ae7271 Enable Trunk Quarantine for FE unit tests (#65022) 2025-10-27 11:50:20 +13:00
metamben
08c8d0f1f6 Add implicitly joined tables as dependencies (#65015)
* Add implicitly joined tables as dependencies

Fixes QUE-2705

* Simplify table ID collection

* Align local names with producer function names
2025-10-27 01:11:26 +03:00
Nemanja Glumac
bdef8558a9 Remove manual version resolution for nanoid (#65023)
It already resolves to a higher version than that
which was defined in a resolution.
2025-10-26 21:59:24 +01:00
Jeff Bruemmer
20c7cb44a3 docs - minor edits (#65021)
* minor edits

* Apply suggestions from code review
2025-10-26 15:00:19 +00:00
Uladzimir Havenchyk
eda355803b Merge remote-tracking branch 'origin/master' into nmezzopera/test-pyodie 2025-10-26 16:39:15 +03:00
Uladzimir Havenchyk
e6df0dc8c5 Merge remote-tracking branch 'origin/master' into nmezzopera/test-pyodie 2025-10-26 16:02:00 +03:00
Uladzimir Havenchyk
90b57af0ae drop patch from cypress-esbuild-preprocessor (#65010) 2025-10-26 00:08:49 +02:00
Uladzimir Havenchyk
6ec03b098e chore: make bookmark button look the same as other action buttons (#64951)
* chore: make bookmark button look the same as other action buttons

* revert active state
2025-10-25 22:50:07 +03:00
Uladzimir Havenchyk
7b7d02442a deps: don't bring node polyfills into browser (#64740)
* deps: don't bring node polyfills into browser

* patch package

* fix lint

* bring back Buffer

* another attempt

* Revert "patch package"

This reverts commit 0aee5326018c25f3281400a9254c37fe2b4e7199.

* update password-generator

* try different config

* add fallback

* one more attempt

* one more attempt

* add back buffer

* one more time

* update rspack

* update rspack config

* drop crypto polyfill and patch package instead

* address review

* update patch
2025-10-25 06:54:41 +00:00
Maz Ameli
5decddf00c Simplify metabot icon (#65017) 2025-10-24 23:59:37 +00:00
John Swanson
bacdb174ee Remote Sync (#62686)
* Fix remote sync settings test

* Fix sync type setting validation test

* Fix check sync task type is production

* Update plain type to collection_type

* Cascade changes to collection type

* Update deps checks when collection type changes

* Fix task type check in export

* move setting check to api for better status report

* add tests for sync-type

* Don't mark newly created entities as updated or removed UXW-1806

* UXW-1821 enabled badge

* UXW-1818: hide branch picker and push button for non-admins

* cleanup and UXW-1814

* remove border from the branch picker button

* cleanup

* UXW-1829 update diff modal ui

* UXW-1807: token should appear masked

* Allow setting of nil token

* UXW-1833: show backend error when saving invalid git settings

* Add new collection update/create events

* Remove per collection imp/exp; change dirty status table

* Redo event handling add removed status

* Sync object table on syncs

* Fix status names

* Added /current-task/cancel API and track version in remote_sync_task

* Add is_remote_synced to api responses

* Fix adding is_remote_sync hydration

* Fixed compilation error

* remove hashp

* Fix loading is_remote_sync hydration

* Resolve ambiguous reference

* Fix n+1 detector

if it gets a heterogeneous set of things we should hydrate each type
separately.

* Add can-create? handlers

* remote sync: a few bugfixes and improvements from my bugbash (#64372)

* Set `collection.type` on archive/unarchive

When unarchiving or archiving collections that have the `remote-synced`
type, we need to set their new type appropriately.

When archiving, we should give them a normal (nil) type.

When unarchiving any collection *to* a remote-synced collection, we
should set the type to `remote-synced`.

* Allow serdes without archived items

and use it in remote sync export.

During dependency checking, we do *not* want to exclude archived items:
if card A uses card B, and card B is archived, we need to include Card B
in the list of dependencies! Otherwise we'll say that it's fine to
remote sync card A when it's not.

* Add tests

* Documents are descendants of collections

* don't include cards as document descendants

* fix tests, dashboard descendants args

* remove #p and unnecessary query

* remove another `#p`

* Update auto sync token to enable import job

* More is_remote_sync hydration fixes

* Fix lints and document oss serdes

* Fix cards to be valid for update events

* Don't actually import if nothing has changed in the remote repo

* Remove hashp

* UXW-1817: change branches should update content

* UXW-1813 ensure sync dirty state is properly invalidated

* UXW-1864 fix how collections changes appear in the diff

* Fix ee-available? check

* Improve is_remote_synced hydration

* Fix some more oss/ee issues

finish remote ChangeLog model

* fix invalidation on removal

* fix missing require

* Don't need to handle transforms directories specially

* fix tests to make sure state is fully reset

* remove duplicate require

* Fix deadlock on import

* Fixing tests

* Fix document tests

* Fix kondos

* handle removed sync_status

* UXW-1851: show moving out of synced collection error

* feature flag, misc fixes

* dirty state tracking for snippets

* Fix ns typo

* Add remote-sync token and config

* enforce remote_sync token feature on the FE

* allow cancelling the remote-sync

* Track timeline

* Force re-import when configuring for production mode

* Fixed compilation error

* Force re-import when configuring for production mode only when auto-sync is enabled

* Throwa 400 error if there are dirty objects when doing an import

* force import button

* Better archiving checks with remote synced collections

* Better tests for documents and remote-sync deps

* Remove hashp

* remote hashp

* Remove other hashp

* More consistent collection write checks

* Fix broken collection tests

* Fix broken documents tests

* improve imports/exports frontend

* Implement can-create? for timeline-event

* tweak copy

* Always update branch setting

* Initial Commit

* Fix more tests

* Remove bad parallel annotations

* Show error toast when adding a collection that has references outside of the repo

* reasonable structure, error handling

* timelines editing is less frequent, we can invalidate dirty state on any edit

* Fix dirty state api tests for mysql

* bring error details back

* Fix collection move tests

* Fix remove parallel from can_restore tests

Splitting this into smaller tests seems to introduce some kind of state
that causes tests to fail in parallel

* Fix make logs use unique names for be tests

* Bump toucan2 versions

* Fix var name

* Fix check that there are exportable collections

* Add test for exportable check

* Started on e2e test

* Fix issue with merge

* Fix arguments to card descendants

* Handle new ingestable interface

* Put back changes in cypress-runner

* Fix remaining failing enterprise tests

* Fix one set of app tests

* Clean remote sync state in obj tests

* single collection

* Fix unit test - enterprise getIcon function only applied when new feature is enabled (ResultItem.unit.spec.tsx)

* Fix ts issues / Clean up

* FE fixes

* Remove parallel annotations

* Fix missing import from merging master

* Fix the fix

* always create collection to sync

* no unsyncing

* Remove associating location to trash from search

* Prevent users from switching branches with unsynced changes + show warning

* Create remote-sync collection when it doesn't exist

* Prevent changing to production with unsynced changes

* Make sure dirty state refetches on admin settings load

* single synced collection ui update

* Cannot change to production mode when there are unsynced changes

* Fix failing query

* unquote branches

* fix eastwood

* fix timeline event publishing

* fix import

* Move dashboard remote sync api tests into ee

...where they can reference the setting

* Created /stash API and renamed create branch api to /create-branch

* Fix settings issue

* Fix remaining permissions message tests

* Make sure drop target always works for trash

* Add checks for if we're in trash elsewhere

* cleanup

* git-sync to remote-sync

* more git-sync to remote-sync

* Don't allow export if it overwrites an external commit

* - Don't assume a "main" branch
- Attempt an import when no remote-sync branch exists when enabling dev mode

* Fix creating remote sync library

* refactor to middleware

* hack: add a delay for refetching instance settings or dirty state after remote sync task finishes

* UXW-1953: confirmation flow when switching branches in prod

* Update modal when switching branches with dirty state / Component refactorings

* Create a branch off the last-used commit, not the branch itself

* Add options modal when trying to push while remote is ahead

* Support force option on export

* Update branch setting and complete task in txn

* Let export! set branch in stash and fix tests

* Fix PR feedback nits

* Update enterprise/backend/src/metabase_enterprise/remote_sync/api.clj

* Consistent documentation style in remote-sync

* Add option to pull from remote / Adjust push/pull icons / Adjust out-of-sync options modal

* modals UI polish

* constants clean up

* Add api schemas and make error messages consistent

* fix check-403 to write-check

* Apply suggestions from code review

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

* Clean up a couple components / Move things around

* Address renaming suggestions

* Fix var names and bad merge

* double->float in schema

* Share error handling

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

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

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

* Addressing small PR comments

* Refetch properties when branch is created (current branch changed)

* Make sure /current-task is only called when import and export are not in progress

* Replace unset color variables

* Improve element padding on side panel

* Remove a couple trailing spaces reported by clj whitespace linter

* Show error when settings request fails / Make sure current-task also waits for the PUT settings mutation

* Fix document perm tests

* Allow empty remote-url, moved import and export calls to impl

* Fix minor prettier issue

* Fix another lil lint issue

* temp

* e2e push / pull

* Unify more of the import implementation

* fix CI failures

* fix mysql ci failures

* Address metabot critiques

* Address additional metabot feedback

* last round of docstring feedback

* library admin settings e2e

* Add attribution to TODO

* fix ws

* fix missed commiting file

* fix another missing file

* production switch branches

* More clojure like docstrings

* More docstring fixes

* adding branch switching test

* Address Nick's PR review comments (most of them)

* Fix more nits

* Resolving Nick's comments part 2

* Improving remote-sync settings handling

* attempt to repair synced_folder icon

* Fail if attempting to connect to an uninitialized repo

* correct the name of synced_collection.svg

* add new repository icon

* Add default-branch to source protocol

* Update Git Sync to Remote Sync in Admin settings (#64993)

* Make api docstrings and errors more generic

* Use check-400 to simplify api

* fix ws

* Rollback BaseSMTPConnectionForm.tsx (fixes a e2e test)

* fix e2e tests?

* Fix small merge issue

* Always use `last-version` instead of caring about import vs. export version

* starting warning modal tests

* Fetch source at the beginning of import/export operations

* Fix broken test

* Delete branches that were deleted on remote

* Fix missing test suffix

* Fix eastwood

* Adjust branching e2e test, skip failing tests

---------

Co-authored-by: Edward Paget <ed.paget@gmail.com>
Co-authored-by: Nathan Voxland <nathan@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Edward Paget <edpaget@users.noreply.github.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Anderson <anderson@metabase.com>
Co-authored-by: eliotmetabase <eliot@metabase.com>
Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
2025-10-24 15:58:25 -07:00
metamben
bb6d7b1cbc Fix transform target table hydration (#64999) 2025-10-24 21:41:57 +00:00
Nemanja Glumac
f01ea21e37 Do not deduplicate js dependencies automatically (#65004) 2025-10-24 21:53:53 +02:00
Riley Thompson
e937214a8d Include documents and dashboards in dependencies (#64888) 2025-10-24 13:42:24 -04:00
Tyler Plude
d9060d941c [METABOT] Project Code Gen (#63313)
* init branch

* FE - add codemirror diffing, add diff support to native query editor, fake a proposed query

* Add /ee/metabot-tools/get-transforms endpoint

Returns a sequence of all python or native query transforms.

BOT-391 [Backend] Create transform index tool API

* Add test that get-transforms does not include non-native MBQL transforms

* Add /ee/metabot-tools/get-transform-details endpoint

* allow opening metabot on transforms admin pages

* use transforms_codegen profile for metabot on transforms page

* send transform in context

* show metabot on edit + create transforms page

* accept tranform suggestions from metabot

* Cleanup malli schemas for get-transforms and get-transform-details

* add transform context on edit query page

* use transforms instead of data queries

* Parse out tables from transforms in metabot user context

* wip on creation flow

* hack in a message to metabot on save

* quick fix preview error not displaying correctly

* misc. fe improvements

* fix transform context on subsequent edits for the same transform

* half hacky way to use current editor state for context in transform editing

* Switch /ee/metabot-v3/get-transforms from :get to :post

This endpoint doesn't expect args of it's own in the body, but does accept the standard metabot conversation_id that
it echoes back.

* Show 'Apply Changes' button when a transform change is generated by the agent

* handle new transforms better

* Ensure we have a fallback for context items that don't have SQL to parse

* persist diff of transform to the conversation history

* temp - make metabot always visible on transforms admin pages

* Change button label to "Proposed changes to <transform>"

* copy change for create transform buttons in chat

* better hidden message ui

* hack - better emtpy convo text

* hide suggested prompts

* Add basic snippets tools

* ensure proposed queries go through nativeQuery.setQueryText so that template tags are parsed

* better todos

* even better todo list ui

* crude sidebar ui for query transforms diffs

* better suggestion chat ui

* good'nuff @mentions

* debug logging for search table bug

* further logging

* Ensure we parse template tags for transform edits in Metabot sidebar (#64001)

* cleaner, more copy/pastable, better flowing @mentions in metabot

* Fix metabot get-transforms api test to :post not :get

* Update metabot tools test with basic python transform tests

* Ensure transform :source and :target keys get snake cased when returned from metabot tool apis

* Add get-transform-python-library-details metabot tool api endpoint

* Enhance context with :used_tables for python transforms

* surface transforms in @-mention search

* some type fixes

* python FE progress

* python fe improvements + edit experience now works

* clear proposed on cancel

* fix accept in sidebar not saving

* better diff colors

* smaller todos

* cleaner code for todos

* improve ranking of transforms in search by hardcoding a last_viewed_at time in user-recency-expr

* first pass at nested @mentions

* Conditionally add transforms to model->db-model

* Add transforms-python to module deps for metabot

* Move native-query-transform? into transforms.util and re-use existing utils

metabot-v3.tools.transforms defined a couple of helper functions that were nearly identical to ones that have since
been added to transforms.util ns. Move some things around and make use of the existing transforms.util predicates,
which are now exported from the module's core namespace.

* lots of fe clean up

* prevent rewinding conversation for admin pages

* @mention solution that plays nicely with documents

* fix search bug

* fix type issues and few small feedback things

* Add transforms to search for Metabot (#64134)

* index transforms content

* Add support for transforms & query search in metabot search tool API

* fixup whitespace

* update to use new :fields syntax

* Fix up serach-native-query malli types

* Fix the 15-day interval for transforms to be db-agnostic

* move engine loading to metabase.search.init to break circular dep

* fix kondo

* Revert "Fix the 15-day interval for transforms to be db-agnostic"

This reverts commit 11b34e4cd4a8a5a0cf8041a1d82d487ed8c81025.

* add transform to set of appdb scorer models; unrevert db type fix

* fix kondo

* implement requisite multimethods for transforms not to error in in-place search engine

* ensure we enforce metabot/unknown contexts for transforms in in-place search backend as well

* fix filter test

* transform->postprocess to reduce naming ambiguity; add a basic transform ingestion test

* add a metabot result postprocessing test

* add transforms scoring test

* expand ingestion tests

* fix tests + kondo

* address feedback

* make suggestion models configurable for a Metabot instance

* fix @mention recents in documents, update suggestion sidebar component to not accept / reject items + calculate isViewing better

* quick fixes

* for rye guy

* Handful of fixes for transforms search (#64287)

* Add both search and search_v2 endpoints, and fix bug with search-native-query option

* add a docstring

* add a basic unit test for search-native-query option

* address comments

* better state management for suggested transofrms, move css around, clean up suggestion message code

* Update the list of source tables in Python editor when metabot changes it (#64258)

If metabot proposes changes to the list of input tables for a Python transform, update the PythonDataPicker component
to keep it in sync with the text of the transform source.

* python tables reference fix

* bug fixes and better state organization

* better draft support

* fix types

* add on leave modal, clear transforms on route leave, calc dirty state, fix onChange but for native query editor, better logic for showing cta text for transform suggestions

* Ensure transforms get deleted synchronously from the search index (#64382)

* Delete transforms from search index in t2/define-before-delete

* kondo

* fix up tests

* Stop pretending to snake_case transform source and target keys

The malli schemas were wrong, so these weren't actually getting snake_cased anyway.

See also:

https://github.com/metabase/ai-service/pull/387#discussion_r2414569482

* Fix failing test & kondo warning

* Add transforms dependency check API for metabot (#64542)

* WIP - add dependency check API for metabot

* omit bad_cards for now

* update return format

* add tests

* Fix fn call

* revert unneeded refactor

* Fix search transform-ingestion-test to use mt/native-query

* switch test to mt/native-query

* Fix module usage test

* fix up tests to use lib/native-query instead

* try to fix last test

* switch native-query-transform? to use lib.query/native?

* more mbql 5/metabase lib updates

* revert the 1-pixel fix

* Subtract a pixel when computing metabot chat filler height to avoid scrollbar flicker (#64690)

* Fix MetabotAgentSuggestionMessage only show "create" for new transforms (#64598)

https://metaboat.slack.com/archives/C09CR3MT1KR/p1760034396345789

* Surface broken cards from Metabot dependencies check API (#64781)

* fix missing sidebar diff after mbql5 change

* surface broken cards

* add test

* fix kondo

* remove unused code

* Fix up dep check question terminology & schema

* fix up test

* fix up another test

* address feedback

* Update the transform source schema to use ::queries.schema/query

* remove unused require

* address FE feedback

* fix modules config test

* @mentions tests and improvements

* couple of e2e tests fixes

* prevent leave confirmation when saving

* fix most of unit tests

* add back searchable models in metabot @mentions

* More tests for transform search + transform dependencies tool, and some new future-proofing read checks (#64896)

* add some future-proofing read checks to transform deps checks + related tests

* add some more transform search tests

* remove 404 check; move read check later in impl

* convert from toucan transform instance to metadata

* clean ns

* Add tests for metabot tools snippets and check-transform-dependencies endpoints (#64894)

* Add tests for metabot tools snippets API endpoints

* Add test for metabot tools check-transform-dependencies endpoint

* Remove trailing blank line to appease linter

* add MetabotChatEditor.unit.spec.tsx

* add links.unit.spec.ts

* add AIMarkdown.unit.spec.tsx

* add MetabotAgentTodoMessage.unit.spec.tsx

* add MetabotAgentSuggestionMessage.unit.spec.tsx

* add metabot/state/reducer.unit.spec.ts w/ tests for suggested transforms state

* add e2e test coverage for create + update flow for both native sql + python transforms

* FE pr feedback and lint fix

* unit test fixes

* fix search test

* add temp metabot toggle button in admin nav

* fix a couple of failing FE tests

* attempt fix ci flake issue with metabot.unit.spec.tsx

* remove metabot-only restriction on transform search

* remove redundant logs in transform api endpoints to address ngoc's comment

* fix a number of transform search tests

* fix another test

* fix hopefully last search test

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Mihael Konjevic <konjevic@gmail.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-10-24 11:58:30 -05:00
Cam Saul
15b31fb834 nest-query => Lib (#64940)
* nest-query => Lib

* Fix schema

* Update changelog

* PR feedback from #64901

* Upgrade field resolution to handle CATEGORY_2 => CATEGORY

* Update docstring

* Test fix 🔧

* Test fixes 🔧

* Whoops commit new file

* Test fixes 🔧
2025-10-24 09:42:55 -07:00
Nemanja Glumac
ce56b8e398 Simplify and unify M2 and node-modules caches (#64955) 2025-10-24 18:18:51 +02:00
Sébastien
d2b54425f2 Closes EMB-906 custom branding images for SDK (#64946)
* .

* .

* types

* tidy up

* tidy up again

* tidy up again

* cleanup
2025-10-24 17:35:22 +02:00
metamben
8722548f6d Add permissions checks for the dependencies API (#64965) 2025-10-24 10:57:43 -04:00
Nemanja Glumac
8a542dd80a Introduce Metabase CI caching strategy (#64988) 2025-10-24 16:20:56 +02:00
Marcos
940d244d2d fix stuck loading in 'caching in questions and dashboards' admin section (#64799) 2025-10-24 11:15:50 -03:00
Alex Yarosh
33e9a2cc25 docs: ai chat component (#64989)
* ai chat component

* oops

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

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

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

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

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-10-24 14:05:48 +00:00
Nick Fitzpatrick
9ddffb2edf handful of fixes (#64854)
* handful of fixes

* trash icon color, fix tooltip text in charts

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-24 09:48:04 -03:00
Uladzimir Havenchyk
c396990a98 fix(command palette): show different skeleton when no recent items (#64929)
* fix(command palette): show different skeleton when no recent items

* cleanup

* make props required

* fix typecheck

* remove default
2025-10-24 11:23:40 +00:00
github-automation-metabase
29f1dac45f Update generated docs (master) (#64975)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-24 07:14:17 -04:00
Mahatthana (Kelvin) Nomsawadi
db9c8dcfbf Wait for timeline to refresh before clicking the checkbox (#64984) 2025-10-24 11:41:08 +01:00
Dan Stone
2dc59090e3 Connection closed flake during python-transform-timeout-status-test round 2 (#64947)
* Remove redundant transaction setting in timeout test

Did not fix flake as expected

* If in a transaction do not open the python log thread
2025-10-24 09:48:04 +00:00
Fraser
a13c7d234d Remove unused packages from package json (#64941) 2025-10-24 20:43:51 +13:00
Fraser
577b1d8fb6 Remove regenorator-runtime (#64942)
Generators are native in browsers now, this dep is not needed
2025-10-24 14:30:23 +13:00
Anderson
6586bba402 Removing docs/* for ignore (#64973)
Due to `useEngineDocMarkdownContent` changes the dynamic imports are needed for `import(`docs/databases/connections/${docFileName}.md`)`

Co-authored-by: Jonathan Sheely <jsheely@thirtytech.net>
2025-10-23 20:03:34 -03:00
dpsutton
686113d2d7 disable snowflake (#64962)
https://linear.app/metabase/issue/DEV-997/reenable-snowflake-in-ci

due date one week
2025-10-23 17:00:56 -05:00
John Swanson
a893803cfb Collections are delete-able (#64414)
* Collections are delete-able

The `can_delete` flag for collections was the only missing bit to have
collections be deletable, since I added an API endpoint to delete
collections a while ago! I thought FE work was required, doh.

Fixes UXW-1090

* Fix e2e tests
2025-10-23 13:16:52 -07:00
Cam Saul
aa200bc31f X-Rays => Lib (#64901)
* Rework X-Rays to use Lib

* Test change

* Fix the last few failing tests

* Remove dead code

* PR feedback

* Claude updates

* Fix typos

* Oops

* e2e test fix 🔧
2025-10-23 10:03:38 -07:00
Alexander Polyankin
1b03fa10a9 Dependency tracking graph (#64202)
* Search

* Search

* Search

* Search

* Search

* Search

* Search

* Search

* New format

* New format

* New format

* New format

* New format

* New format

* updated graph endpoint

* added /graph/node

* remove prn

* add ability to get graph for a single node

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* New format

* update graph api again

* Fix viz icon

* CSS hack

* CSS hack

* Fix layout jump

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Types

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix tests

* Fix tests

* Fix

* update api

* Fixes

* Add view count

* Add view count

* update api again

* Fix

* Fix

* Fix

* Fix

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* Add sorting

* api update

* Fix merge

* Fix merge

* Fix merge

* Search

* Search

* Search

* Search

* Search

* Search

* selection

* selection

* selection

* selection

* selection

* selection

* selection

* selection

* selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Restrict transform search to admin users and add basic test

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix selection

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Info

* Info

* Add a bunch of fields to the data nodes

* Info

* Info

* Info

* Info

* Hydrate table fields in graph endpoints

* Info

* Info

* Info

* Info

* Info

* Info

* Hydrate table for transforms and db for tables

* Remove comment form

* Info

* Info

* Acknowledge that db id, schema, and table name form a key

* Info

* Info

* Info

* Fixes

* Fixes

* Adjust loading

* Add check

* Add check

* Fixes

* Fixes

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Tests

* Fix compilation

* Tests

* Tests

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* UI updates

* Handle errors

* Handle errors

* Handle errors

* Handle errors

* Handle errors

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Fix some tests

* Remove view_count for non-questions

* Fix one more test

* Add more tests

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Remove view_count for non-questions

* Add e2e tests

* Add e2e tests

* Rename to dependents_count on FE

* Rename :dependents to :dependents_count in the BE

* Fix FE types

* Fix FE types

---------

Co-authored-by: William Zimrin <william@metabase.com>
Co-authored-by: Tamás Benkő <tamas@metabase.com>
2025-10-23 12:17:13 -04:00
Nemanja Glumac
ac8285254b Start utilizing the Trunk Quarantine for E2E tests (#64873) 2025-10-23 14:10:37 +02:00
Sébastien
1a8a04cf82 fix(sdk): Closes EMB-905 no error when embedding MB localhost->distant MB (#64835)
* Closes EMB-905 no error when embedding MB localhost->distant MB

* cleanup
2025-10-23 12:33:32 +02:00
Sébastien
750c6ebb22 Fixes "In HTML, <button> cannot be a descendant of <button>." error and removes console warnings (#64904)
* Removes many console NPE warnings

* button -> icon for widgetStatus

* role

* fixup

* padding

* fixed flaky
2025-10-23 11:56:09 +02:00
Nemanja Glumac
2c71824e61 Sane CI caches PoC - Cypress (#64932) 2025-10-23 13:53:08 +13:00
Nemanja Glumac
a58b2ebefc Remove unused add-to-project action (#64910) 2025-10-22 17:13:39 -07:00
Nathan Voxland
ac22d632bc Improve logging and recovery around errors in reindexing and create-table! (#64897) 2025-10-22 16:07:13 -05:00
Uladzimir Havenchyk
7fac1f9d24 Merge remote-tracking branch 'origin/master' into nmezzopera/test-pyodie 2025-10-23 00:06:52 +03:00
Phoomparin Mano
b56f63252b Design polishes for modular embedding and embedding setup guide (#64893) 2025-10-23 03:14:52 +07:00
Uladzimir Havenchyk
62fceee952 fix: restore missing css after migration to new postcss-preset-env (#64874)
* fix: restore missing css after migration to new postcss-preset-env

* update comment

* Update postcss.config.js

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

* proper fix

* fix comment

* remove path

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-10-22 22:36:56 +03:00
Phoomparin Mano
2feb85417d feat(sdk-bundle, embed-js): stacked layout updates for metabot question (#64573) 2025-10-22 19:16:44 +00:00
John Swanson
8dc5cec918 Remove :feature checks on some EE code (#64848)
* Assert premium features for some middleware

* Fix an existing bug

These tests started failing here, which revealed that they formerly
never actually were testing what they thought they were.

A few reasons:
- they turned on `advanced-permissions` feature by itself, so sandboxing
was always off here

- they set up sandboxing in a nonstandard way

- one had a typo so we weren't even wrapping the body with
`with-download-perms!` (it was a separate block entirely)

This hid the bug that some of the tests were intended to reproduce - if
a card used for sandboxing had a native query, then we required that you
have download permissions on the entire database, which is wrong.

* fix test

* make assertions with/without tokens for sandboxing

* Add comments about why `:feature :none`

* Update enterprise/backend/test/metabase_enterprise/sandbox/query_processor/middleware/sandboxing_test.clj

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

* add a nicer docstring and change fn name

replace `any-native-unsandboxed-stage?` with
`any-native-stage-not-introduced-by-sandbox?`

* Block without feature enabled

* CR response

---------

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-10-22 11:20:12 -07:00
Phoomparin Mano
560a253192 Design polishes for EAJS embed wizard (#64895) 2025-10-23 01:19:07 +07:00
github-automation-metabase
753c645216 Update generated docs (master) (#64900)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-22 14:10:00 -04:00
Anderson
bd18384233 Fix unnecessary redirects on Models & Metrics pages (#64489)
* Fix models and metrics links to prevent redirect from /question/:id-slug

* Fix e2e
2025-10-22 13:42:49 -03:00
Nicolò Pretto
67d603aa42 feat(sdk): plugins passed to the provider are passed down to the (#64920)
dashboard
2025-10-22 15:52:18 +00:00
Rodrigo López Dato
b9ac3ab886 Allow app and capacitor schemes as valid origins for Ionic apps (#64719)
* Allow any scheme for URLs, not just http/https

* Explicitly allow app:// and capacitor:// schemes

* fix flakiness in e2e test

* Only accept HTTP/HTTPS when no protocol is specified

---------

Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
2025-10-22 11:02:11 -03:00
Nicolò Pretto
bef6cb6908 make mapQuestionClickActions intercept links and fix links to host app (#64623)
* ugly solution #1

* revert the ugly part

* refactor and tests

* fix(modular): make links/click behavior that link to the same origin as the host app work and open them on a new tab

* update tests to expect a click behavior

* clean up tests

* tests for the same domain issue

* add also basic support for links, just in case

* Update e2e/test-component/scenarios/embedding-sdk/dashboard-click-behavior.cy.spec.tsx

* refactor tests as per feedback to use mockIsEmbeddingSdk

* don't remove column settings
2025-10-22 15:07:59 +02:00
Nemanja Glumac
f573f15de1 Replace and remove use-table-list-query (#64772) 2025-10-22 10:33:01 +00:00
Kamil Mielnik
38bf19399d Update onboarding video (#64905) 2025-10-22 09:59:44 +00:00
Cam Saul
f3b85b3e33 Lib column unique key (#64889) 2025-10-22 09:54:57 +00:00
Nemanja Glumac
23f74a039f Update team members in team.json (#64902)
Removed 'kulyk' from Admin team and added multiple members to DevEx team.
2025-10-22 11:19:25 +02:00
Kamil Mielnik
3ad1913339 Separate favicon for dev env (#64845)
* Add separate favicon for dev env

* Don't use dev favicon if a custom one has been set

* Red favicon

* Format code
2025-10-22 16:16:37 +07:00
Dan Stone
e622f71034 Opt logging test out of slower drivers (#64903) 2025-10-22 09:03:45 +00:00
Mahatthana (Kelvin) Nomsawadi
abeef3b5a8 feat(sdk): Let end users archive items in the CollectionBrowser SDK component (#64561)
* Remove unnecessary default value

* Remove unnecessary export

* Show move to trash icon in CollectionBrowser

* Make the trash button easier to work with

* Add a dropdown

* Fix icon

* Archive resources in the collection browser

* Add tests

* Update UX

* Prevent external type change

* Remove custom style
2025-10-22 04:38:59 +01:00
Fraser
2637538cee Use more robust approach to detecting unmocked routes (#64508) 2025-10-22 16:14:26 +13:00
Maz Ameli
5aad91c383 fix border color (#64857) 2025-10-21 20:49:49 -04:00
Maz Ameli
5931cb0d0a Subtler Add Data button in side nav (#64745)
* subtler add data button in side nav

* fix tests

* update test

* fix unrelated broken test

* fix another unrelated broken test

* try fixing test again

* undo changes to unrelated tests

* Cursor's attempt at fixing related test
2025-10-21 15:49:01 -07:00
Cam Saul
8ad785fdbb Deprecate legacy MBQL utils (#64595)
* Deprecate legacy MBQL utils

* Deprecate legacy MBQL utils

* cljfmt

* Fix most tests except long native column names

* Kondo

* Test fixes 🔧

* Fix .clj versus .cljc in Lib

* Disable deprecation warnings

* Fix cljs

* Mega normalization improvements

* Kondo

* Another round of test fixes 🔧

* Schema fix 🔧

* PR feedback; test fixes

* Test fixes 🔧

* Fix BigQuery tests

* Test fix 🔧

* Test fixes 🔧

* Fix Card QP parameter normalization AGAIN 😆

* Oops

* Fix Claude code review

* Fix Claude code review

* Fix BigQuery tests
2025-10-21 15:29:36 -07:00
dpsutton
78308b14f9 Extend db connection timeout in tests (#64886)
* Extend db connection timeout in tests

We allow for 10 seconds in the app, and 3 seconds in test. I extend that
3 seconds to 5 seconds. This should really only affect bigquery.

In bigquery, we test if you "can connect" by connecting to the project
and then attmepting to find any datasets that you are able to see. This
is important because each test run connects to the same project but is
scoped down to fewer datsets. It's possible we could change this
behavior and return if you can list datasets at all, but it is nice if
you can see at least one dataset based on your inclusion and exclusion
filters.

For reference, the filters for my current CI run are:

```clojure
bigquery-cloud-sdk=> (update details :service-account-json (constantly "<<redacted>>"))
{:project-id nil,
 :service-account-json "<<redacted>>",
 :dataset-filters-type "inclusion",
 :dataset-filters-patterns "sha_4c3ca6238018e2b60025297f3e5c39671588adf2_QLGKZKIAOSQXOGGDURQY",
 :include-user-id-and-hash true,
 :project-id-from-credentials "metabase-bigquery-driver"}
```

In my repl, i'm seeing the following behavior:

```clojure
bigquery-cloud-sdk=> (time (let [client (database-details->client details)
                            project-id (get-project-id details)
                            datasets (.listDatasets client project-id (u/varargs BigQuery$DatasetListOption))
                            ]
                        (vec (for [^Dataset dataset (.iterateAll datasets)
                               :let [dataset-id (.. dataset getDatasetId getDataset)]
                               ]
                           dataset-id))))
"Elapsed time: 2692.292292 msecs"
["BQ_tupac_sightings"
 "Shakespeare"
 ...
 "v6_sample_dataset"]
bigquery-cloud-sdk=> (count *1)
273
```

So just enumerating all datasets takes ~2.7 seconds so we are flirting
with the fail limit of 3 seconds.

I extend this to 5 seconds and this should only give a bit of breathing
room to bigquery and everything else remains the same.

* fix flakiness in e2e test

---------

Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
2025-10-21 17:15:28 -05:00
Alex Yarosh
3d5410d199 samesite (#64883) 2025-10-21 17:28:05 -04:00
Phoomparin Mano
497ef8ebe1 Embedding hub's checklist endpoint fails due to sample database changes (#64642) 2025-10-22 02:39:38 +07:00
Dan Stone
ec16936ff8 Add new columns to metabase_field for internal-tools/data-apps (#60263)
* Add migrations

* Add new columns to serde spec

* Update serde baseline

Will change again in follow up once sql-jdbc behaviour is ported

* Extend sql-jdbc describe-table

* Sync new field columns

* Extend field our-metadata to the new sync columns

* Fix tests

* Add postgres support new field columns

* Add generic driver tests for nullability and defaults

* Extend clickhouse test driver to :not-null? :default field defs

* Add new columns to mysql describe-fields-sql

* Add new features for better test specification

- :describe-is-nullable
- :describe-default-expr

In both cases if the feature is unsupported, the driver must return `nil` for the respective field metadata keyword.

* Add :database-is-generated test and driver feature

* Fix load-data inserts when rows empty

* Do not return generated-column-sql for redshift

* Fix snowflake-test/describe-table-test

* Fix bigquery load-tabledef when table has no rows

* Use generation_expression rather than :extra for mysql/mariadb

* Fixup driver features

* Amend pk-sync-test to verify the new :database_is_pk behaviour more explicitly as the semantic type changes

* Add sync tests for default/generated/nullable

* Formatting

* Add SQLite support for generated/nullable/default

* Add SQL-Server support for generated/nullable/default

* Only test dynamic dataset databases for now

* For druid JDBC all columns (apart from __time) are nullable

* Vertica does not support generated columns

* Starburst does not support generated columns

* Presto does not support generated columns

* Revert accidental database-required behaviour change

* Assert table synced

* Use def'd datasets rather than inline

* Oracle features

* Vertica features

* Opt starburst, presto out of defaults

* Add :test/create-table-without-data to deal with mongo

* Add some new lines to mig yml

* Add note about sync to driver test

* Do not spam logs for pk changes on upgrade

* Further logging guard refinement

* Fix migration conflicts
2025-10-21 17:59:51 +01:00
Dan Stone
c4cfe78c2c Fix devcontainer deprecated apt-keys call (#64879)
NodeSource should handle its own keys
2025-10-21 16:29:09 +01:00
github-automation-metabase
d0fff0402a Update generated docs (master) (#64858)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-21 11:26:52 -04:00
Alex Yarosh
f267ce0c56 Revise impersonation permissions details (#64878)
Updated impersonation permissions documentation to clarify supported databases and row-level security for PostgreSQL.
2025-10-21 11:14:00 -04:00
Dan Stone
363ed3b959 Ensure idle_in_transaction_session_timeout is large enough during timeout test (#64866) 2025-10-21 15:53:19 +01:00
Noah Moss
b4c65c3299 [semantic search] Separate out embeddable_text from searchable_text and use labeled format for embedding (#64693)
* [Search] Separate out embeddable_text from searchable_text and use labeled format for embedding

* add embeddable_text to test data

* update mock-embeddings in tests to use new format for embeddable strings

* Fix more tests

* Fix more tests

* Fix last tests

* Fix last test

* improve comments & add a test that transform fns are not applied
2025-10-21 10:37:35 -04:00
Nemanja Glumac
195b18d690 Remove unused [ci nocache] CI option (#64852) 2025-10-21 16:36:53 +02:00
Phoomparin Mano
3a0e283b12 Move the SameSite cookie settings from interactive embedding to security tab (#64533) 2025-10-21 21:07:23 +07:00
github-automation-metabase
97c57e7bac chore(sdk): Update published npm version to 0.57.0-alpha.3 (#64870) 2025-10-21 12:43:23 +00:00
Mahatthana (Kelvin) Nomsawadi
92cea5d4f5 Fix download not getting parameters from visualized dashcards (#64754)
* Fix download not getting parameters from visualized dashcards

* Add E2E test

* Make test name clearer
2025-10-21 12:50:03 +01:00
Nemanja Glumac
dbf8855111 Ignore fn-deprecated warnings in cljs logs (#64867) 2025-10-21 13:46:49 +02:00
Kamil Mielnik
292a7c8058 Fix flaky test (#64863) 2025-10-21 11:12:32 +00:00
Dan Stone
83fdbaa65c Ensure field insertion order is consistent with :database-position (#62491)
Avoids FE ordering depending on hash iteration order on initial sync - in particular avoids
breakage in tests relying on id positionally if hashes change.
2025-10-21 09:07:58 +01:00
Mahatthana (Kelvin) Nomsawadi
0ab2b9f4f6 Fix flaky SDK tests (#64699)
* Remove double beforeEach setup probably from a mistake

* Fix the flaky test. I hope...

* Attempt to fix the test that failed the interception

* Revert change

* Fix the flake on Cypress CI
2025-10-21 04:50:17 +01:00
Timofey Kachalov
9d687287fe Fix build-e2e-matrix.unit.spec.js tests (#64851) 2025-10-20 23:51:27 +04:00
Phoomparin Mano
b5e93da266 fix(sdk-bundle, sdk-package): add missing focus color due to dark mode changes (#64641) 2025-10-21 02:15:15 +07:00
Nathan Voxland
78bf0474d6 Removed unneeded liquibase preconditions (#64694) 2025-10-20 11:11:33 -05:00
Nathan Voxland
b7bf8b6ecc Move the creation of the "card_view" tracking from the card APIs to query execution level (#64115) 2025-10-20 11:10:27 -05:00
Ngoc Khuat
65d95d9438 Polymorphic transforms (#64084) 2025-10-20 12:00:01 +00:00
Mahatthana (Kelvin) Nomsawadi
205bd075a9 Fix some events not shown on charts when grouping with different units (#64801)
* Fix some events not shown on charts when grouping with different units

* Take timezone into account

* Add tests

* Simplify return
2025-10-20 12:23:30 +01:00
Nemanja Glumac
0e8804a8cc Avoid setting up python transforms in every e2e test group (#64749) 2025-10-20 11:09:23 +00:00
Kamil Mielnik
6773707b3e Fix multiple flaky e2e tests (#64728)
* Unskip and unjail

* Modernize test

* Fix stubbing

* Remove tag

* Wait for sync to finish

* Fix flaky test

* Update test

* Unmark test as flaky

* Unmark tests as flaky

* Increase timeout

* Add const

* Fix flaky test

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Resync db

* Decrease flakiness

* Add a comment

* Fix flaky test

* Revert

* Out of jail

* Fix flake

* Decrease flakiness

* Try to decrease flakiness

* Revert "Try to decrease flakiness"

This reverts commit 38eadb47a3.

* Try to fix flakiness

* Fix

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Remove redundant blur

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Decrease flakiness

* Add comments
2025-10-20 16:57:52 +07:00
Uladzimir Havenchyk
3037854ee0 deps: upgrade rspack (#64800) 2025-10-20 09:53:15 +03:00
Sébastien
14b05dc189 Closes EMB-853 renamed legends get ignored by content translation (followup) (#64706)
* Closes EMB-853 for cartesian charts

* tests

* cleanup
2025-10-20 08:15:49 +02:00
Sébastien
20d149c48d Make switch to data button keyboard accessible/interactive (#64321)
* .

* fixed e2e

* toggle color
2025-10-20 08:14:58 +02:00
Nemanja Glumac
165c061afb Fix rspack alias type issue (#64770)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-10-18 23:53:24 +02:00
Oleksandr Yakushev
2fce0a53a6 Bump Malli to 0.19.2 (#64593) 2025-10-18 19:03:04 +00:00
Nathan Voxland
fd2c44a380 Reduce reflection overhead in search (#64785) 2025-10-17 15:18:37 -05:00
Alexander Polyankin
b86eb24b0c Fix transform e2e tests (#64805) 2025-10-17 20:50:23 +03:00
Uladzimir Havenchyk
8eb405c96b speed up fe build by upgrading svgo (#64671) 2025-10-17 20:18:59 +03:00
Braden Shepherdson
dd5117bdb1 [QP] Fix convertTimezone exprs with no src TZ and SQL source (#64710)
Closes QUE-2613.

`convertTimezone` now checks the type of the field ref, since we might not know to make the compiled
column a timezone-backed column when the previous stage is a native query.
2025-10-17 12:39:44 -04:00
Romeo Van Snick
935fe5a0e5 CodeMirror editor small fixes and dark mode updates (#64791)
* Remove double border

* Remove overflowing corners on functionbrowser

* Fix HelpText header background in dark mode

* Remove dot in customexpression editor

* Fix dark mode completions in native editor

* Move color fixes to CodeMirror component

* Move CodeMirror cursor fix in darkmode to shared CodeMirror module

* Move completion styles to shared CodeMirror component

* Enable highlighting of partials in Python completions

* Remove more shared CM code

* Fix e2e test

* Fix timout in e2e test
2025-10-17 16:38:32 +02:00
Uladzimir Havenchyk
96750294f5 deps: upgrade packages we had duplicated in bundle (#64743)
* deps: upgrade packages we had duplicated in bundle

* update imports
2025-10-17 08:24:59 +00:00
Romeo Van Snick
19a811f282 Fix timeout in e2e test (#64796) 2025-10-17 07:22:00 +00:00
Oleksandr Yakushev
0be7ef31cf [perf] Introduce lean implementations of for and doseq (#64392) 2025-10-17 09:48:39 +03:00
Braden Shepherdson
7c76029e6b [perf] Use cached MetadataProvider on FE; reuse MP in /query_metadata (#64780)
This addresses most of QUE-2686 #64774 but a second PR is required to fix a
56-specific issue that doesn't apply to `master`.

The FE was not using the new
`lib.metadata.cached-provider/cached-metadata-provider` except where
it gets added by `lib/query`. Previously, the FE constructed the
*uncached* MP once (ish) and then passed it to `lib/query` many times.
Each of those queries got its MP wrapped with `cached-metadata-provider`
but the next time the query got converted via `lib/query` its cached
values (eg. `visible-columns`, `returned-columns`) were lost.

This PR wraps the `lib.js.metadata/metadata-provider*` with
`cached-metadata-provider` from the start, so the cached values have
the same lifespan as the `MetadataProvider`, rather than each individual
query.

I also noticed that `/query_metadata` requests don't use
`lib-be.metadata.jvm/with-metadata-provider-cache`, so they end up
recreating `MetadataProvider`s for the same underlying database over and
over. That increases AppDB traffic and CPU usage to recompute
`returned-columns` etc. repeatedly. Both of those scale fast with the
complexity of the query.
2025-10-17 05:34:59 +00:00
metamben
7ee5fffead Allow both db and dbname in Redshift connection details (#64748) 2025-10-17 05:08:59 +00:00
Romeo Van Snick
7491d37214 Do not reset collection selection after canceling action (#64766)
* Do not clear selection when canceling action

* Add repro for metabase#44911
2025-10-17 10:38:25 +11:00
Oleksandr Yakushev
fc98a81852 [malli] Use optimized postwalk when calculating schema-cache-key (#64655) 2025-10-17 01:19:36 +03:00
Oleksandr Yakushev
d76377e784 Fix two backend test flakes (#64782)
* Fix extract-nested-efficient-test flake

* Fix health-check-database-test flake
2025-10-17 00:23:49 +03:00
Oleksandr Yakushev
dddf6568c1 [util] Implement Seqable for rconcat to avoid crashing CIDER (#64656) 2025-10-16 23:12:59 +03:00
Alexander Polyankin
9fd8200087 Convert DataModel queries to MBQL lib (#64633) 2025-10-16 15:16:37 +00:00
Uladzimir Havenchyk
a9c06c5ece chore: speed up frontend build with upgrade of postcss plugin (#64670)
* speed up frontend build

* fix tests

* deduplicate

* add a comment

* deduplicate
2025-10-16 14:52:00 +00:00
Uladzimir Havenchyk
0a2aa0f087 deps: move html2canvas to a separate bundle (#64708) 2025-10-16 17:02:11 +03:00
Marcos
f42ea9842a Add Marcos and Rodrigo to slack map (#64773)
* add rodrigo and marcos to github slack map

* chore: add marcos and rodrigo to github-slack-map
2025-10-16 10:33:49 -03:00
Jeff Bruemmer
448ed2d9e0 fix script link (#64767) 2025-10-16 13:47:03 +02:00
Nicolò Pretto
0bcd797755 disable excessive spam in the prs caused by sdk build (#64733)
* disable excessive spam in the prs

* to-revert: change source code to trigger the build

* test2

* :shrugs:

* Revert "to-revert: change source code to trigger the build"

This reverts commit 37f6abb085.

* clean up and comment
2025-10-16 10:22:05 +02:00
Kamil Mielnik
1a645a55d6 Fix flaky embedding-reproductions test (#64702)
* Fix flaky test

* Increase timeout

* Decrease flakiness

* Fix flaky test

* Try with cypress-iframe

* Decrease flakiness

* Pass selector arg

* Move line

* Add a wait

* Fix test

* Add comment
2025-10-16 07:28:41 +00:00
Romeo Van Snick
d1cb9336da Cancel sql transform preview (#64726)
* Allow canceling SQL transform preview

* Add repro for metabase#64474
2025-10-16 13:14:30 +11:00
John Swanson
f569537850 Fix the fixup-viz-settings hack (#64746)
This fixup broke because QP started returning the db-shaped
viz-settings (e.g. `:table.columns`) instead of the normalized
viz-settings (e.g.
`:metabase.models.visualization-settings/table-columns `) under
`[:json_query :viz-settings]`.

The existing test for this fix did not catch the regression because the
shape of viz settings was faked out for testing, and did not get
transformed like real viz settings. `{:ver 2}` stayed as `{:ver 2}`,
while `{:table.columns []}` is transformed into
`{::visualization-settings/table-columns []}`
2025-10-15 22:07:16 +00:00
John Swanson
392a3ebc48 uxw-1935: mark settings as set by env var (#64569)
A few settings weren't wrapped with `SetByEnvVarWrapper`, so weren't
marked as un-modifiable.
2025-10-15 09:00:37 -07:00
Alexander Polyankin
9e401daa2e Ignore BE exception when checking dependencies (#64716) 2025-10-15 11:36:54 -04:00
Kamil Mielnik
f67961423a Fix flaky documents test (#64711)
* Use H.visitDocument

* Revert

* Decrease flakiness

* Fix chaining

* Revert

* Remove redundant within

* Fix
2025-10-15 17:06:03 +07:00
Kamil Mielnik
a4564a2e12 Unskip and update calendar test + fix date range picker text inputs not in sync with calendar inputs (#64603)
* Fix date range picker text inputs not in sync with calendar inputs (#64602)

* Unskip and update test

* Add repro for #64602

* Add unit tests

* Add issue tags

* Rename date to displayedDate
2025-10-15 05:49:47 +00:00
Alexander Polyankin
0cf0d86421 Deprecate fields in Question.create that are used to manipulate raw MBQL (#64715) 2025-10-15 02:20:50 +00:00
Alexander Polyankin
309e69774e Fix caching with drills (#64723) 2025-10-14 21:49:55 -04:00
Alexander Polyankin
5a880ebfb8 Use MBQL lib for table editing (#64722) 2025-10-14 20:50:33 -04:00
Nemanja Glumac
645543ff3e Remove deprecated radio form (#64679)
* Update the last instance of deprecated `FormRadioWidget`

This commit replaces a deprecated `FormRadioWidget` with the
`FormRadioGroup` component (which is a light wrapper around
the plain Radio.Group from Mantine).

* Remove the deprecated `FormRadio` component
2025-10-15 00:05:35 +02:00
Uladzimir Havenchyk
4b1ee493db chore: use standard colors for skeleton (#64588) 2025-10-14 19:36:38 +00:00
Alex Yarosh
db08e23530 docs: new place for alerts (#64688)
* Revise alert creation instructions in documentation

Updated instructions for creating alerts, including clearer steps and options for different alert types. Adjusted formatting for consistency and added details on editing and managing alerts.

* Enhance clarity in delete and restore documentation

Updated the documentation for deleting and restoring items to clarify the impact on related content and improve phrasing.

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-14 16:45:49 +00:00
Jeff Bruemmer
d5131a98f6 Update iframe resizer script source in documentation (#64718) 2025-10-14 15:46:28 +00:00
Brad Anderson
4f99d70ece UXW-88 Fixed issue where Show values for this series switch is hidden because of the default value for show_stack_values (#64691) 2025-10-14 11:24:04 -04:00
Nick Fitzpatrick
ed772da268 Dark mode Day 2 patches (#64549)
* lots of small fixes

* removing debug code

* adjusting e2e

* small adjustments

* whoops
2025-10-14 15:56:25 +02:00
Kamil Mielnik
1d88be2135 Refactor - Organize TablePicker (#64617)
* Move EmptyState, Search, and Tree to separate files

* Move hooks and constants out of utils

* Move components to a separate directory

* Fix import
2025-10-14 13:42:53 +00:00
Kamil Mielnik
d825953952 Fix flaky tests (#64700) 2025-10-14 17:31:52 +07:00
Kamil Mielnik
bf5799df15 UXW-311 [Sheets] Clicking notification should refresh the page (#64614)
* Fix UXW-311

* Add unit test

* Add tag
2025-10-14 09:23:23 +00:00
Kamil Mielnik
d5addc4c59 Fix flaky models/reproductions test (#64677)
* Fix flaky test

* Update e2e/test/scenarios/models/reproductions.cy.spec.ts

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>

* Update e2e/test/scenarios/models/reproductions.cy.spec.ts

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>

* Update e2e/test/scenarios/models/reproductions.cy.spec.ts

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-10-14 07:16:01 +00:00
Kamil Mielnik
fe858b408a Fix flaky onboarding/command-palette test (#64678)
* Fix flaky test

* Update comment
2025-10-14 13:30:27 +07:00
Kamil Mielnik
9c48cd347a Fix flaky test (#64681) 2025-10-14 13:30:19 +07:00
Kamil Mielnik
922845855d Fix command palette keyboard shorcut overflow on non-macs (#64606) 2025-10-13 19:54:43 +00:00
Romeo Van Snick
4bc3b6484b Ban certain imports in Python script 2025-10-13 17:02:06 +11:00
Nemanja Glumac
963be74964 Remove deprecated Lib.displayName (#64647) 2025-10-11 17:32:19 +02:00
William
062ba25fe8 add default noop implementation of native-query-deps (#64384)
We call native-query-deps on query save on mongo queries. This ensure that doesn't error, while still flagging if we don't implement native-query-deps for a driver that is supposed to support it.
2025-10-10 17:34:36 -05:00
Alex Yarosh
7d2275e326 docs: details view (#64645)
* details view

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-10 20:53:08 +00:00
dpsutton
db11feef9b use disk at query time of notification payload creation (#64390)
* use disk at query time of notification payload creation

We have some nice work to dump query results to disk if they are larger
than a row-count threshold. But this presupposes that results can fit
into memory. It's completely possible, and relatively easy, to do some
kind of "select *" operation in a dashboard where the only limit that
prevents billions of rows coming back is the excel limit we add in.

This tries to optimistically use the disk. If creates a new rff that has
two modes: in-memory and a gzipped dataoutput stream. The first is in
operation for the first 2,000 rows. If we never exceed this limit it
remains a regular reducing function. Once this threshold is exceeded, we
open a new file and stuff the rows in there and don't keep them in
memory any longer. This prevents us from having to hold the entire
result set in memory at once.

On the consumption side, we have a threshold such that if a file is
_larger_ than this, we won't attempt to load it and render it for static
viz. This is what lets us defensively decline to do an operation that
would reasonably lead to an OOM.

Optimizations for the future:
- give up on file creation once it exceeds the threshold size. We can
easily monitor the size of the file as we go and stop the transduction
or results.
- clear out files more frequently. This will probably litter lots of
temp files, some possibly quite large, on teh disk. We need to more
frequently clear them up. The directory is marked as deleteOnExit, but
we need to ensure we don't put lots of files in there during process
lifetime.
- better error rendering of "too large" error. Right now it hits the
default error rendering (previously it would oom). We can make this
better.
- explore how parallel we can get now. Presumably we are now quite
memory effecient. Can we go back to 3, or 10, worker threads?

* fix typo and reintroduce constant for row threshold

* more references to typo constant

* missed one somehow?

* include pulses (alerts) for autocommit off for downloads

we want to stream results. and now we do into a file so this can respect
the page size which only happens in pg when using autocommit false

* special error msg for too large results/dont attach large results

feedback that query results were too large

alerts also by default include results. let's check for the
render/too-large and not include them in that case. Was actually getting
a seq error on the deftype that holds the file. maybe want to give that
a seqable method?

* fix tests

we had an unrealized temp storage file going through

* unification all to streaming before moving to temp-storage

* move streaming to the temp-storage namespace

* don't deref results if no one wants attachments

* don't log the error here. it's pretty normal

* doc strings

* better logging and truncate results above threshold

once we are above the size that we won't read the file, we don't have to
keep piping results to it.

Concretely, what does this get us? If someone absentmindedly did
`select * from transactions` it could be 100s of GBs or more. Without
this, we would fill up the disk for the instance even though we don't
try to render it in the email. But once we know that there's no way we
will read the contents of the file, we really don't have to write to it
any longer.

* Make settings for size limit and whether to enforce

maybe someone has a beefy machine and they don't mind chugging through
843mb of query results to get a graph. they can easily set
`MB_ENFORCE_NOTIFICATION_TEMP_FILE_SIZE_LIMIT` to false and the old
behavior will be restored. If someone doesn't like the 10mb limit and
prefers a 50mb limit they can do
`MB_NOTIFICATION_TEMP_FILE_SIZE_MAX_BYTES=52428800` and then they will
have the higher limit

* Huge performance improvements

The real gist here is removing the gzip on the output. This was crushing
our performance. 18 seconds instead of ~4 seconds. Real bad. And it's
better to not gzip anyways. We really want to be tied pretty closely to
the size of the results. GZiping uses a ton of cpu and gets it very
compact. But we want a number that is pretty representative of the
results. Repeated values get gzipped down to almost nothing and then
they could still OOM the instance. But 50mb of results might get
squashed down to ~8mb of text. We want to be tethered close the size in
a csv or in memory.

Also changed the serialization to write chunks of rows and not a single
row. Its totally possible that the gzip fix did all of the work and
chunks or individual rows all get put together into the
bufferedoutputstream so it doesn't matter anyways. But the good thing is
that the format of this file is entirely the work of this namespace and
no one else gets to see it.

* Check for fidelity of regular results and disk based

timing wise: running the same card 356 (a join of people, products,
orders) and verify timing stays consistent (we are only 100ms longer
with disk)

```clojure
temp-storage=> (time
                 (-> (toucan2.core/select-one-fn :dataset_query :model/Card :id 356)
                     metabase.query-processor/process-query
                     :data :rows count))
"Elapsed time: 740.709583 msecs"
18760
temp-storage=>
(time (->
        (metabase.notification.payload.execute/execute-card 1 356)
        :result
        (select-keys [:notification/truncated?
                      :status :running_time
                      :data.rows-file-size
                      :data])
        (update :data (fn [d] (select-keys d [:rows])))))
"Elapsed time: 840.608 msecs"
{:status :completed,
 :running_time 724,
 :data.rows-file-size 8056845,
 :data {:rows #object[metabase.notification.payload.temp_storage.StreamingTempFileStorage
                      "0x3336077d"
                      {:status :pending, :val nil}]}}
```

Compare in memory results:

```clojure
temp-storage=> (let [card-id 356
                     regular-rows (-> (toucan2.core/select-one-fn :dataset_query :model/Card :id card-id)
                                      (metabase.query-processor/process-query)
                                      :data :rows)
                     disk-rows    (-> (metabase.notification.payload.execute/execute-card 1 356)
                                      :result :data :rows)
                     dereffed @disk-rows]
                 (doseq [[f results] [["/tmp/results.from-disk" dereffed]
                                      ["/tmp/results.from-qp" regular-rows]]]
                   (with-open [w (clojure.java.io/writer f)]
                     (doseq [row results]
                       (io/copy (str (pr-str row) \newline) w))))
                 [(= regular-rows dereffed) (= (count regular-rows) (count dereffed))])
[true true]
```

and then compare the files written above:

```shell
/tmp
❯ diff results.from-disk results.from-qp

/tmp
❯ echo $?
0
```

* weird postgres types

* postgres 12 didn't like gen_random_uuid so just hardcode one

everyone else promised they wouldn't use
7e3cd49d-bfe1-4620-83dd-0c163719175c for anything important

* formatting, lints

* alignment

* reformat, remove unused aliases

* remove errant comment

* cleanup logic and add some comments

unconditionally add to rowcount and in-memory collection of rows. For
two of three branches, this is "done": (1) collecting in memory, and (2)
streaming to disk but our "batch" isn't full. Only when the batch is a
multiple of 5,000 rows (number completely picked at random, balancing
this) we can then write the row block to disk.

Totally possible this can switch to just writing to disk on each row and
rely on the buffered writer to handle batching. But the use of the
in-memory collection being similar across almost all of the branches
makes this solution feel a bit cleaner for the moment.

also does things like inverting `if-not` so the short branch is at the
top and not hanging at the end where it's esay to miss.

* unify two file size settings

used to have some notion of `enforce` and `file-size-limits` Rather than
juggle both, you can just set the filesize to 0 to make it unbounded

* reuse human-readable-size in more places, fix some typos

* typos, fixes

* prometheus metrics

* followup to metrics

I’ve added a new metric
```clojure
   (prometheus/counter :metabase-notification/temp-storage
                       {:description "Number and type of temporary storage uses"
                        ;; memory, disk, above-threshold, truncated, not-limited
                        :labels [:storage]})
```

to record the different scenarios of query results:
- stayed in `memory`
- wrote them to `disk` but remained under the threshold
- wrote to disk and they went `above-threshold`
- wrote to disk and they went so far above threshold that we abandoned the query so the results were `truncated`
- wrote to disk but the limit was set to 0 so the results were `not-limited`

and these look like: (replaced # with ♯ so git message will include)

```
❯ http get :9191/metrics | grep temp
♯ HELP metabase_notification_temp_storage_total Number and type of temporary storage uses
♯ TYPE metabase_notification_temp_storage_total counter
metabase_notification_temp_storage_total{storage="memory",} 2.0
metabase_notification_temp_storage_total{storage="disk",} 2.0
metabase_notification_temp_storage_total{storage="truncated",} 2.0
```

* make predicates a bit more clojurey

* missed a refactor somehow

* better styling

thread the human readable size through

* styling changes

* bit of formatting

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-10-10 14:35:02 -05:00
Nicola Mometto
9abc92f46e fix: don't take from nil chan (#64589) 2025-10-10 19:20:36 +00:00
dpsutton
74e8f41ff0 turn off some more tests [ci skip] (#64640)
i’m turning off a few tests:

- "metabase-enterprise.transforms-python.transforms-api-test/python-transform-schema-change-integration-test" this
fails in redshift as seen here: https://github.com/metabase/metabase/actions/runs/18413981334/job/52473134679?pr=64390
cc @querying-be

- "metabase.warehouses.api-test/can-rescan-fieldvalues-for-a-db" as seen here:
https://github.com/metabase/metabase/actions/runs/18413981334/job/52473134684?pr=64390

- "metabase.warehouse-schema.api.table-test/update-table-sync-test" as seen here:
https://github.com/metabase/metabase/actions/runs/18413981334/job/52473134684?pr=64390 (same run)
2025-10-10 13:44:15 -05:00
Alex Yarosh
9a192e68de Revise embedding guide and emphasize user accounts (#64637)
Updated the embedding instructions and added a note on user accounts.
2025-10-10 18:31:10 +00:00
Alex Yarosh
5171f664bb doc: Add local currency label style (#64636)
* Add currency label style options to formatting.md

Added options for displaying currency labels in the formatting section.

* Clarify currency label style options

Updated the currency label style section to clarify options for displaying currency labels, including examples for Canadian dollars.

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-10 18:28:03 +00:00
Maz Ameli
763e923003 Follow-ons to dashboard chart improvements (#64308)
* subtler background lines on cartesian charts

* increase font size on cartesian charts and legends to 13px

* improve size and spacing of legends for pies and choropleths

* change legend color to text-primary

* change case and color of pie chart center subtext

* change small funnel text to 13px

* tweak the number of y-axis tick marks when set to auto for small charts

* Update Loki Snapshots

* Update Loki Snapshots

* update specs, polish

* specs

* specs

* cleanup

* Update Loki Snapshots

* subtler background lines on cartesian charts

* increase font size on cartesian charts and legends to 13px

* improve size and spacing of legends for pies and choropleths

* change legend color to text-primary

* change case and color of pie chart center subtext

* change small funnel text to 13px

* tweak the number of y-axis tick marks when set to auto for small charts

* Update Loki Snapshots

merge in updated loki tests

* update specs, polish

* specs

* specs

* cleanup

* Update Loki Snapshots

merge master's loki snapshots

* Update Loki Snapshots

* update be specs

* move border-subtle definition from colors.module to colors.ts

* table border color fixes

* fix overly thick dashboard heading border-bottom

* Cursor's attempt at fixing related tests

* Cursor again attempts to fix tests

* specs

* cleanup

* another attempt to fix specs

* Update Loki Snapshots

* fix cartesian chart and pivot table lines in dark mode

* Update Loki Snapshots

* attempt to fix chart test

* spec

* unrelated test fix but I need to merge this PR

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2025-10-10 11:13:29 -07:00
Alex Yarosh
02cd142074 docs: command palette update (#64634)
* command palette update

Updated keyboard shortcuts for opening the chat sidebar in Metabot documentation.

* Simplify custom action creation instructions

Removed instructions for creating a custom action from the command palette.

* Update appearance settings reference to 'Branding'

* Remove Metabot reference from exploration.md

Removed mention of asking Metabot in the exploration section.
2025-10-10 13:48:54 -04:00
Alex Yarosh
30e330a409 docs: ch transforms only for ch cloud (#64632)
Specify that ClickHouse transforms are only available on ClickHouse Cloud.
2025-10-10 13:29:21 -04:00
Alex Yarosh
43c6d9a938 docs: dark mode (#64534)
* dark mode

* Update docs/configuring-metabase/appearance.md

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

* Update docs/people-and-groups/account-settings.md

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

* Apply suggestions from code review

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

* Apply suggestions from code review

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

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-10 16:58:43 +00:00
github-automation-metabase
1c747783e1 Update generated docs (master) (#64597)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-10 12:52:43 -04:00
Nicola Mometto
26e8fd90ed fix broken schema for python transforms (#64625) 2025-10-10 17:39:25 +01:00
Robert Kosara
7b47ae9236 Add boolean keywords to filters and expressions docs (#64592)
* Add 'boolean' to filters page

Added boolean expressions support to custom filter documentation.

* Add boolean keywords to expressions doc

Updated section on conditional operators to include comparison and boolean logic operators.

* Fix anchor so old links work

* Fix missing period

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

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-10-10 16:36:48 +00:00
Nicolò Maria Mezzopera
d0cca704c6 Update GitHub team configuration (#64558)
* chore: update github team

* chore: remove team members from other teams
2025-10-10 16:23:42 +01:00
Uladzimir Havenchyk
dd2effb8f4 actual fix for infinite loop (#64612) 2025-10-10 14:53:28 +00:00
Edward Paget
0c93082c71 fix: ns for metadata provider cache (#64620) 2025-10-10 09:21:30 -05:00
Nicolò Pretto
49152f6a36 Make the e2e create a copy of the sample db, so it doesn't run into locking issues with core app (#64120)
* poc of allowing us to run the backend and the e2e at the same time

* use more scary name as suggested
2025-10-10 15:45:03 +02:00
Braden Shepherdson
21e9d33c66 [MBQL lib] Use :between filters for bucketed time fields (#64218)
When using the `underlying-records` drill ("See these Orders") on a bucketed temporal value, such as a data point in
a time series, use a `:between` filter with the endpoints of the bucket, rather than `:=`.

The queries work with `:=` (because the QP expands them to `:between`) but some parts of the filter UI
render it badly. With `:between`, the filter is rendered properly as a date range.
2025-10-10 13:37:42 +00:00
Braden Shepherdson
eb33b4991e [perf] Cache MetadataProviders for /dashboard/1/params/abc/values (#64541)
Fixes QUE-2651.

Use `lib-be.metadata.jvm/with-metadata-provider-cache` to avoid a pile of duplicate calls to
appdb while hydrating the dashboard.
2025-10-10 13:17:38 +00:00
Uladzimir Havenchyk
92a67eb3b7 skip tests broken after #63913 (#64611) 2025-10-10 07:59:32 -05:00
Jakub Chodorowicz
35f1f1903d Make Metabot logo gray when brand color customization is defined (#64566)
* Make Metabot logo gray when brand color customization is defined

* Add MetabotLogo stories and test them with Loki

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>

---------

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>
2025-10-10 14:37:51 +02:00
Timofey Kachalov
070963f9f9 Allow run-query overlay when query result has missing-required-parameter error (#64521) 2025-10-10 13:30:35 +04:00
Nicolò Pretto
3de66a09e8 tests(sdk): add tests for new mapQuestionClickActions behaviors (#64523) 2025-10-10 10:01:10 +02:00
Kamil Mielnik
6ab4cca8f2 DSN-79 In questions and metrics, Alerts shouldn't be within Sharing menu (#64510)
* Move QuestionAlertsMenuItem usage QuestionSharingMenu to QuestionMoreActionsMenu

* Fix divider logic

* Fix bogus skipToken usage

* Exclude models and some cases

* Add more permission checks

* Move QuestionAlertsMenuItem

* Fix permissions check

* Move unit tests

* Inline setup

* Move tests

* Fix modal situation

* Fix invalid export

* Rename dir

* Update onboarding

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Change order
2025-10-10 12:54:52 +07:00
Mahatthana (Kelvin) Nomsawadi
27d6352a93 Fix value between optional parameters without values not visible (#64550) 2025-10-10 04:56:37 +01:00
Romeo Van Snick
ee29d769a0 Add more tests for backend test runner 2025-10-10 14:25:02 +11:00
Romeo Van Snick
013974b705 Improve python runner mode switch 2025-10-10 13:53:51 +11:00
Fraser
b12bc41d58 Delete e2e Save modal test (#64350) 2025-10-10 15:48:35 +13:00
Fraser
14f4f37e34 Delete skipped relative time-view-rendering e2e test (#64499) 2025-10-10 15:48:10 +13:00
Fraser
accf8b0b06 Delete skipped filters repro e2e test (#64495) 2025-10-10 15:47:39 +13:00
Marcos
376daff947 fix transforms snippet sidebar add/edit button (#64575) 2025-10-09 18:00:00 -03:00
dpsutton
73d896e661 remove extra pg driver tests (#64581)
* remove extra pg driver tests

it is already covered in

```yaml
  be-tests-postgres:
    if: ${{ !inputs.skip }}
    runs-on: ubuntu-22.04
    timeout-minutes: 60
    strategy:
      fail-fast: false
      matrix:
        version:
          - name: Postgres 12.x
            junit-name: postgres-ee
            docker-image: postgres:12-alpine
            env:
              enable-ssl-tests: 'false'
          - name: Postgres Latest
            junit-name: postgres-latest-ee
            docker-image: postgres:latest
            env:
              enable-ssl-tests: 'true'
        job:
          - name: Driver Tests
            test-args: >-
              :only-tags [:mb/driver-tests]
            exclude-tag: ':mb/transforms-python-test'
```
.github/workflows/drivers.yml

* empty commit to run full drivers test suite
2025-10-09 15:01:11 -05:00
Uladzimir Havenchyk
4260236d61 chore: drop deprecated time handling utils (#64380)
* chore: drop deprecated time handling utils

* fix tz jest tests
2025-10-09 22:53:58 +03:00
lbrdnk
97df7676bd Catch errors in suggested prompts job (#64520)
* Catch connection error in suggested prompts job

* Rather catch any Exception
2025-10-09 21:51:11 +02:00
Cam Saul
1a73c0ac20 MBQL 5 over the wire (#63913)
* Misc Lib improvements

* Restore deleted function... for now

* N+1 hydration fix

* Update tests

* Test fix 🔧

* Mark more stuff in Legacy MBQL utils as deprecated

* Use Lib for query->source-card

* Update modules config

* Update tests 🔧

* Fix the X-Rays

* Test fix (Druid)

* Druid test fix 🔧

* Appease Kondo

* Normalize Card.dataset_query to MBQL 5

* Cleanup

* Some test fixes 🔧

* Fix tests in the parameters module

* Fix 2 more tests

* Fix most of the Dashboard tests

* All Dashboards tests passing

* Another pass: all tests in parameters module are passing again

* cljfmt

* Kondo

* Kondo

* Revert X-Ray changes

* X-Rays WIP

* Finally all X-Rays tests passing

* Kick CI

* People are writing new code doing legacy MBQL manipulation 😒

* I think everything is working now except for SerDes v1

* Test fixes 🔧

* Handful of test fixes 🔧

* Another test fix 🔧

* Kool fixes; delete SerDes v1

* I think I fixed all the failing tests

* Some Kondo fixes 🔧

* Maybe I fixed everything

* Ready to try CI again

* Restore accidentally-deleted namespace

* Fix almost all my complaints with #63248

* Commit lib-be.hash

* Test fixes

* Another test pass

* Kondo warnings

* Kondo (second pass)

* Fix stray parameter

* Test fix 🔧

* parameters.schema needs to be cljc

* Test fixes 🔧

* Test fixes 🔧

* Another round of test fixes 🔧

* cljfmt

* Kondo

* clj-kondo and cljfmt

* .clj => .cljc

* Fix cljs

* Test fixes 🔧

* Test fixes 🔧

* Add queryToJs() and jsToQuery()

* MySQL test fixes? 🔧

* Schema fix 🔧

* PR feedback

* Add DB migrations

* Support fetching legacy queries

* Init metadata provider cache automatically

* Fix migration

* Fix migrations (again)

* Oops check in missing file

* cljfmt, kondo, test fixes 🔧

* Fix build

* Fix MongoDB table-rows-sample

* Fix search for MySQL

* Appease FE linter

* Fix for internal queries

* MongoDB fix 🔧

* Update JS <=> Cljs query functions to take MP

* cljfmt

* Initial FE changes

* Initial FE changes

* Initial FE changes

* Initial FE changes

* Update FE helpers

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Hack

* Fix formatting; normalize before calling lib/query

* Fix for REAL

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix parameters substitution for JS parameter maps

* cljfmt

* Add note

* HACK

* Fix test

* Fix

* Another parameter normalization fix

* Remove X-Rays error

* X-Rays cleanup

* Additional validation for normalizing queries

* Fix

* Fix

* Fix metadata for empty Cards

* Fix

* Fix normalizing :lib/original-binning in :field refs

* Fix

* Correctly normalize MBQL 5 Metric definitions coming from JSON

* Fix

* fromJsQuery should throw on empty queries

* Fix test failure

* Fix

* Fix

* BE test fixes 🔧

* Fix

* Fix more backend tests; Kondo

* Fix

* Allow `=` in X-Rays REST API paths for now

* Fix

* Fix

* Fix

* Set card_id: null for actions

* Fix parameter mappings with card_id = -1

* Set card_id: null for actions

* Remove :lib/original-binning in underlying records drills

* Fix

* Fix

* Misc code cleanup

* Fix transform dependencies native validation

* Fix normalization of template tag :options

* Fix template tag schema

* Improved error message for FK details drill

* Minor tweaks

* Code cleanup

* Thank you Claude bot

* Fix Kondo from #64098

* Fix CLJS test

* Fix CLAUDE.md

* Fix

* Fix

* Don't stomp on valid database IDs with empty ones

* Fix

* Make lib.js/query= work on either JS or Cljs/MBQL 4 or 5

* Fix

* Fix

* Restore normalize

* Restore normalize

* Fix Cljs query caching

* Fix query hash

* Simplify fromJsQuery

* Restore test

* Fix cache

* Fix template tag ordering

* Fix cache issue FOR REALS

* Include batshit amount of nonsense in implicit actions viz settings fields

* Test fix 🔧

* Fix

* Fix

* Fix

* Fix with-template-tags not filtering out invalid tags

* Fix test failure

* Fix

* Fix

* Fix

* MySQL fix deadlocks in tests

* Restore throw code

* Oops

* Rollback connection changes and de-parallelize X-Ray tests

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-10-09 14:45:36 -04:00
Edward Paget
3cf2372445 fix: test log names need to be unique (#64577)
* fix: test log names need to be unique

* fixup! name of var
2025-10-09 18:39:20 +00:00
Braden Shepherdson
023de6e2d1 [QP] Don't remap FKs to their human-readable column if it's hidden (#64435)
Fixes QUE-2561

For example, in our Sample Database, `Orders.PRODUCT_ID` is remapped to
`Products.TITLE` by default. If you go to the **Table Metadata** in admin
and set `Products.TITLE` to "Do not include"
(which is `:visibility-type :sensitive` internally) it should not be
used for remapping.
2025-10-09 13:33:33 -04:00
Jakub Chodorowicz
cda1d6cd46 Uxw 231 auto scroll to selected entity picker item vertically (#64459)
* Add useEffectOnceIf hook

* Fix entity picker list not scrolling to chosen element

* Remove explicit dependencies

* Move useEffectOnceIf to VirtualizedList folder
2025-10-09 18:09:33 +02:00
Cam Saul
5e14ec7894 Skip Claude code review on draft PRs (#64574) 2025-10-09 16:02:48 +00:00
Cam Saul
46a869e3a4 Further restrict Claude PR review code action generated GH token perms (#64527) 2025-10-09 08:58:59 -07:00
metamben
9b0bfe3815 Fix base-type inference in pivot queries (#64472)
* Fix base-type inference in pivot queries

Fixes #64124
2025-10-09 17:30:00 +03:00
Kamil Mielnik
c291a439a5 Allow to opt out specific PR authors from claude-code-review GitHub workflow (#64554)
* Allow to opt out specific PR authors from claude-code-review GitHub workflow

* Exclude more users
2025-10-09 21:09:00 +07:00
dpsutton
5ce301dec0 bump netty common and buffer to 4.1.124.Final (#64537)
We had tried this previously, but the athena driver has these libraries
uberjar'd into it. So we need this to be in lockstep. See
https://github.com/metabase/metabase/pull/63894 for more info.

but i'll include some info here:
there are two copies on the classpath:

```clojure
user=> (enumeration-seq (.. (Thread/currentThread) getContextClassLoader (getResources "io/netty/buffer/ByteBufAllocator.class")))
(#object[java.net.URL 0x3bb34fe "jar:file:/private/tmp/fixed-athena/plugins/bigquery-cloud-sdk.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"]
 #object[java.net.URL 0x4ac1867d "jar:file:/private/tmp/fixed-athena/plugins/athena.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"])
```

one in the bigquery driver jar and one in the athena driver jar. The
bigquery driver jar has an explicit dep and we can control it
independently. The athena jar has it uberjar'd in and we can't control
it independently. So we want to make sure that we are relying on the
version that is (unfortunately) baked into athena.

For this we can see the athena 3.6.0 jar has the following
pom.properties file:
`META-INF/maven/io.netty/netty-buffer/pom.properties`

```properties
artifactId=netty-buffer
groupId=io.netty
version=4.1.124.Final
```

So we will pin that version in bigquery as well so we only have a
single version (but still two copies) on the classpath.

This way whichever classfile is resolved (and this can vary depending on
whether an athena db or bigquery db is synced first, or health checked)
it should behave the same
2025-10-09 08:04:06 -05:00
Phoomparin Mano
cc2991b4b3 Use non-whitelabeled blue color for Metabase logo (#64524) 2025-10-09 19:45:36 +07:00
Marcos
b9f1682706 Fix long snippet names overflow (#64469)
* fix long snippet names overflow

* add percent width so it uses most space both in SQL models and SQL editor

* fix sidebar width in transforms page

* for SnippetRow, use flex instead of width percentages, fix collection row

* fix snippetrow background so it expands snippet instead of inserting it into the editor
2025-10-09 09:35:16 -03:00
github-automation-metabase
e33d81c3e9 Update generated docs (master) (#64546)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-09 08:25:12 -04:00
Kamil Mielnik
26edf3c9dd Hide shallow copy checkbox instead of disabling it (#64559) 2025-10-09 12:05:37 +00:00
Oleksandr Solovyov
af0b621eeb [serdes] do not say "Loading ..." if entity is not being loaded (#64461)
When investigating a separate issue I've noticed that we're logging "Loading ..." even for entities that are not actually being loaded. That's because we were printing this line when something is a dependency - even if it exists in the database and is not provided in the export.

This changes the approach somewhat, we will still have some indication we need some entity, but only at DEBUG level, and instead the "Loading ..." will appear only if we're genuinely about to read something from an export and put it in the database.

Not only it's easier to understand what's going on, it's going to be way less noisy.
2025-10-09 14:22:14 +03:00
Uladzimir Havenchyk
7c1f6a0e5f Command palette and search modal revamp (#64364)
* WRK-903 Update command palette modal (#64039)

* Remove metabot from command palette

* Remove footer

* Style search input

* Icon color

* Remove actions section when there is no search query

* Rename 'recent items' to 'recents'

* Show 10 recents by default

* Style item

* Update copy (Search results -> Results)

* Use project react import convention

* Move link to search results to group header

* Close palette on results link click

* Fix types

* Use disabled prop in useCommandPalette

* Update item bg

* Align search icon

* Update color whem is active

* Update table icon

* Fix wrong item being selected

* Use stack

* Fix icons shrinking

* Hide subtext on overflow

* Update unit tests

* Fix types

* Clean up

* Hide actions in a different way

* Update helper

* Remove redundant changes

* Update unit tests

* Update unit tests

* Update helper

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update tests

* Add a border to search input

* Update test

* Simplify text overflow handling

* Avoid parent().parent()

* ESLint

* Improve assertion

* Improve assertion

* Remove borders between result groups in command palette

* update styles of the app bar (#64105)

* update styles of the app bar

* rework profilelink to ts

* fix some tests

* fix another e2e test

* update search style

* fix shortcuts conflict

* unify search buttons between oss and enterprise

* don't translate metakey

* fix colors

* let's have two keydown handlers

* fix test

* fix typecheck

* address review comments

* fix showplow event in test

* show metabot icon on small screens

* fix test

* do not show metabot button within iframe

* attempt to fix flaky test

* lint

* address review comments

* address review comments

* add a unit test

* update colors

* address comments

* update skeleton

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-10-09 12:34:46 +03:00
Phoomparin Mano
913bb086c3 Password reset should show confirmation toast (#64522) 2025-10-09 15:32:10 +07:00
Nicolò Pretto
5c3726248f feat(sdk)!: allow mapQuestionClickActions to run actions on click and clean the data we pass (#64425)
* support returning one action with "onClick" to call it immediately

* feat(sdk): add question to the clicked object, part of EMB-796

* feat(sdk): clean up the data we pass as `clicked`, part of EMB-796

makes export types checker happy

remove source

* add stories

* only require `onClick` for the "immediate" actions

* address feedback: fix type of onClick and add warning in case of wrong
shape
2025-10-09 10:28:06 +02:00
Timofey Kachalov
9c2513eb29 Set min width for DashCardActionsPanelContainer to fit content (#64525) 2025-10-09 11:42:17 +04:00
Cam Saul
c2515e7921 Remove rules about number of semicolons, Claude cannot understand them. (#64547)
* Remove rules about number of semicolons, Claude cannot understand them.

* Restore the docstring indentation rule
2025-10-09 05:59:47 +00:00
Cam Saul
0ee3c2ffae Make claude code review bot delete old comments (#64544) 2025-10-08 23:40:29 -06:00
Romeo Van Snick
202290121b Remove unused helper 2025-10-09 16:08:02 +11:00
Romeo Van Snick
5766d22bce Fix flaky test 2025-10-09 15:59:46 +11:00
Romeo Van Snick
7b500427ec Increase timeout for python runner 2025-10-09 15:47:00 +11:00
Romeo Van Snick
d0a36c3d7c Fix misplaced docstring 2025-10-09 14:56:32 +11:00
Romeo Van Snick
ef7ee34349 Add UI to switch between browser runner and api runnner 2025-10-09 14:55:27 +11:00
Romeo Van Snick
24d6fc3d7d WIP 2025-10-09 14:37:27 +11:00
Romeo Van Snick
e00705930f Update python transform endpoint 2025-10-09 14:34:44 +11:00
Romeo Van Snick
a85b69ce0d Adjust pyodide worker types to align with test endpoint 2025-10-09 14:33:20 +11:00
Romeo Van Snick
dff77917f4 Remove blob: for worker-src 2025-10-09 13:17:38 +11:00
Romeo Van Snick
c25d90382f Fix metababot broken code 2025-10-09 13:16:46 +11:00
Romeo Van Snick
42d8c14a8e Improve comments 2025-10-09 13:14:45 +11:00
Romeo Van Snick
6b37f5f3af Add more documentation on the worker pool 2025-10-09 13:13:54 +11:00
Romeo Van Snick
809503986a Only unsubscribe when message is handled 2025-10-09 13:10:13 +11:00
Romeo Van Snick
b551d305fc Remove any 2025-10-09 13:08:59 +11:00
Romeo Van Snick
b24f87f5d1 Remove todo 2025-10-09 13:08:38 +11:00
Romeo Van Snick
9c95e9b8a7 Add comment to proxy route 2025-10-09 13:06:59 +11:00
Romeo Van Snick
8e8480fc95 Only add querystring when it exists
Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-10-09 13:04:29 +11:00
Romeo Van Snick
abf5f8caa8 Top-level comments should have three semicolons
Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-10-09 13:00:52 +11:00
Romeo Van Snick
d13f7355c5 Decompress archive 2025-10-09 12:49:19 +11:00
Romeo Van Snick
e560d95105 Fix typo 2025-10-09 12:48:36 +11:00
Romeo Van Snick
e7828cc2f8 Remove redundant declare 2025-10-09 12:48:09 +11:00
Romeo Van Snick
0af03be7cc Merge branch 'master' into nmezzopera/test-pyodie
# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/transforms-python/components/PythonTransformEditor/PythonEditorResults/PythonEditorResults.module.css
2025-10-09 12:31:14 +11:00
Romeo Van Snick
26915a1feb Remove log 2025-10-09 12:30:03 +11:00
Romeo Van Snick
8fcd5d3839 Do not store pyodide packages in git 2025-10-09 12:28:29 +11:00
Alex Yarosh
c0a07d369c docs: emphasize revoking SQL access for some permissions (#64539)
* docs: emphasize revoked SQL access for some permissions

Clarified permissions regarding native queries in Metabase.

* Update docs/permissions/data.md

* Update docs/permissions/data.md

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

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-10-08 17:19:53 -04:00
Edward Paget
5eed781367 allow cc review to be skipped (#64538)
* allow cc review to be skipped

* Update .github/workflows/claude-code-review.yaml

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

* trying to retrigger when labels change

---------

Co-authored-by: metabase-bot[bot] <109303359+metabase-bot[bot]@users.noreply.github.com>
2025-10-08 16:15:45 -05:00
Uladzimir Havenchyk
bbd050dd95 chore: replace moment with dayjs in time series (#64451)
* chore: replace moment with dayjs in time series

* create a util file

* add a note

* add tests

* update naming
2025-10-08 21:03:24 +00:00
Nick Fitzpatrick
00d21cf20d Fixup of Erroring Questions page (#64119)
* Fixing rerun selected functionality

* Commenting Props
2025-10-08 16:49:14 -04:00
Ryan Laurie
d4eee39154 Misc Dark Mode Fixes 1 (#64484)
* alert colors

* undo text color

* better modal contrast

* Update Saturated Yellow color, Update collection authority form picker

* tooltip secondary color

* Emoji picker transparancy

* make-yellow-not-💩

* fix types

* Update Loki Snapshots

* add border to ye olde model

* cleaning up after nick again

* Alert color and type adjustments

* dashboard autoconnect toast styling

* entity-picker e2e

* Update Loki Snapshots

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-08 16:07:50 -04:00
Alex Yarosh
371b2c2081 docs: python transforms (#64518)
* python transforms

* link

* Apply suggestions from code review

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

* feedback

* more feedback

* Apply suggestions from code review

* links

* Apply suggestions from code review

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-08 18:59:43 +00:00
Alex Yarosh
a48352c7c6 Update date format examples in formatting.md (#64530) 2025-10-08 14:38:41 -04:00
Cam Saul
dcef144251 Claude code review (experimental) (#64487)
* Claude code review (experimental)

* Run my job PLEASE!

* Fix syntax

* More guidelines

* Minor change to see if we can get some useful feedback

* Seriously run my damn workflow

* Add GH token

* Remove paths

* Appease Claude

* Tell Claude how to get the Clojure Style Guide

* Attempt Clojure style guide again

* Give Claude ReadFile perms for the style guide

* Move info about community style guide to CLAUDE.md

* Try again

* Another pass

* Seriously please follow Community style guidelines

* More advice.

* LEARN ABOUT TEST NAMING CLAUDE!!!!

* More advice

* Appease Kondo

* I have a lot to say I guess

* Iterate on CLAUDE.md

* Clarify module linter cheating rule

* CLAUDE u iz dumb

* Chaos

* Dumb as a rocc

* EVEN. MORE. GUIDELINES.

* Clarify semicolon rules more

* Threaten our AI overlords

* Are you dense?

* Annoyed

* BE SUPER DUPER EXPLICIT

* Fun time

* fun

* More dumb comment examples

* Clarify defmethod rules

* SERIOUSLY!!!

* I don't think Claude can count

* More examples of what to avoid

* U not listening

* Clarify

* Use emojys

* Parens

* Be. Even. More. Explicit. About. Semicolons.

* Be SUPER EXPLICIT

* Clarify

* Discourage `qp.store/with-metadata-provider`
2025-10-08 16:32:41 +00:00
Phoomparin Mano
2333182a53 fix(sdk-bundle): missing hover text color in summarization/grouping menus (#64515) 2025-10-08 21:50:05 +07:00
lbrdnk
c12d988306 Revert "Ajust e2e runner options (#64377)" (#64516)
This reverts commit 2375d46cbb.
2025-10-08 14:49:18 +00:00
github-automation-metabase
d19bc1dde6 Update generated docs (master) (#64498)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-08 09:42:16 -04:00
Noah Moss
463ab32c31 Fix Firefox bug where models are not clickable until after selecting & unselecting text (#64491) 2025-10-08 09:29:47 -04:00
Timofey Kachalov
c6f8933e3e Extract SDK bundle error handling tests into a separate test suite (#64502) 2025-10-08 17:22:15 +04:00
Romeo Van Snick
39cefbab7f Revert "Remove pyodide from github repo"
This reverts commit 95bb56b5e8.
2025-10-08 23:11:00 +11:00
Romeo Van Snick
e002ff8980 Revert "Ignore code issues in vendored library"
This reverts commit 3606567fc8.
2025-10-08 23:10:04 +11:00
Stas Gavrylov
f15ed1a734 WRK-907: [Bug][Data Editing] Do not offer to 'Add option' in FK fields (#64304)
* WRK-907: Remove 'create new' option from table action input for FK parameters

* Address PR comments

* Address PR comments

* Update e2e/test/scenarios/table-editing/table-editing.cy.spec.ts

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

* Apply suggestions from code review

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

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-10-08 14:06:48 +02:00
Oleksandr Solovyov
54b3ad3455 [search] make verified dashboards appear when filtering for "verified" (#64462) 2025-10-08 11:56:24 +00:00
Romeo Van Snick
95bb56b5e8 Remove pyodide from github repo 2025-10-08 22:50:35 +11:00
Nicola Mometto
6da9f0a911 use qp directly rather than reaching for internals for python transforms (#64452)
* refactor: use qp directly rather than reaching for internals

* fix sleep test

* kondo

* fix: copy chan, else QP closes it
2025-10-08 12:49:54 +01:00
Romeo Van Snick
1e03d56dac Install pyodide on install 2025-10-08 22:49:38 +11:00
Romeo Van Snick
a5d21e9623 Add script to download pyodide's distro 2025-10-08 22:49:27 +11:00
Nicolò Pretto
82aba4c51d rename tests folder to stories (#64455) 2025-10-08 10:31:38 +00:00
Kamil Mielnik
2dfdc3683b DSN-69 Smart Scalar charts in dashboards shouldn't overflow their card (#64285)
* Move SmartScalar subcomponents to separate files

* Update getValueHeight to support multiple comparisons

* Fix dashcard header height

* Fix overflow with cheap tactics

* Hide all but 1 comparisons if they don't fit

* Fix line height

* Move PreviousValueComparison to its own directory

* Extract DetailCandidate

* Extract VariationPercent

* Extract DetailCandidate

* Remove inTooltip prop in VariationPercent

* Add hidden comparisons to the tooltip

* Update constant

* Add ellipsis badge

* Do not use " • " as text separator

* Make tooltip text white

* Wrap text in the tooltip

* Fix text alignment

* Revert static viz change

* Add e2e test

* Update tests

* Update Loki Snapshots

* Remove separator in static viz

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-08 17:27:38 +07:00
Romeo Van Snick
3606567fc8 Ignore code issues in vendored library 2025-10-08 21:12:10 +11:00
Nicolò Pretto
be441ae625 refactor(sdk): move trasnformSdkQuestion (#64458) 2025-10-08 11:58:27 +02:00
Romeo Van Snick
a3b380ca00 Remove template string quotes 2025-10-08 20:57:55 +11:00
Romeo Van Snick
59ec9091d8 Increase ready timout 2025-10-08 20:57:36 +11:00
Romeo Van Snick
70d8fda6fa Humanize error messages (#63235)
* Allow passing error/friendly in malli schema's to declare them to be be safe for users to see

* Add a user-friendly error message when aggregations don't contain aggregations

* Allow :error/message to be a thunk

* Add repro for metabase#61893

* Use deferred-tru for error message

* Remove deferred-tru
2025-10-08 20:18:15 +11:00
Phoomparin Mano
eae65a4980 fix(sdk-bundle): fallback and warn on invalid layout in MetabotQuestion (#64478) 2025-10-08 16:16:59 +07:00
Dan Stone
11856c2aea Transform cancellation test & fixes (#63833)
* Fix regression with :async? requests

- callbacks were not passed and clj-http would throw

* Fix data correctness issue if cancelled during table read

Fixes an issue where cancellation during the read stage
could cause the python run to receive (and output) truncated/empty incorrect data and write back / succeed anyway.

* Add cancellation test

* Give script a bit more time for CI

* Disable cancellation test for problematic drivers

* Also disable redshift

* Also disable mongo

* Fix regression due to merge conflict
2025-10-08 08:55:41 +00:00
Dan Stone
3f8edd52ce Add column names / ordering to test-run output (#64448) 2025-10-08 08:53:10 +00:00
Timofey Kachalov
e4cd459865 refactor(sdk, embed-js): Additional code preparations for Anonymous Embedding (#64457) 2025-10-08 12:44:16 +04:00
Oleksandr Solovyov
7ff2822811 disable comments in an iframe (#64098)
* disable comments in an iframe

* Remove comments from UI for embedded scenario

* Make isWithinIframe check external for CommentsMenu

* Add e2e test to check that comments are not available in embedded app

* Update Loki Snapshots

---------

Co-authored-by: stasgavrylov <stasgavrylov@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-08 10:28:01 +02:00
Oleksandr Solovyov
4e7e3f10bc pivot download: use source alias name for matching columns (#64192) 2025-10-08 11:21:23 +03:00
Romeo Van Snick
158ce159f7 Add mock for PyodideWorkerManager 2025-10-08 15:52:25 +11:00
Fraser
46c6bcd677 Error a test that accesses unmocked routes (#64311) 2025-10-08 16:19:43 +13:00
Oleksandr Solovyov
42d5d4f442 make db removal somewhat more efficient (#64366) 2025-10-08 05:53:06 +03:00
Romeo Van Snick
a6a737b33b Handle app/dist when not in dev mode 2025-10-08 13:09:57 +11:00
Romeo Van Snick
af75705b3c Remove unused argument 2025-10-08 13:05:41 +11:00
Romeo Van Snick
f904f950ba Rename variable to be clearer 2025-10-08 11:12:49 +11:00
Romeo Van Snick
64a8ec3593 Add search params to request 2025-10-08 10:47:43 +11:00
Romeo Van Snick
9683555c34 Fix disappearing drill icon (#64228)
* Add missing class to ClickActionIcon

* Remove superflous transition

* Move ClickActionsTextIcon to css

* Move ClickActionControl to css modules and metabase/ui

* Tweak css to match prevouis button height
2025-10-08 10:07:52 +11:00
Aleksandr Lesnenko
734dabb163 propagate original card title and description to visualizer cards (#64340)
* propagate original card title and description to visualizer cards

* specs

* fix broken clicking
2025-10-07 22:34:50 +00:00
Jeff Bruemmer
1e5fba41ed remove docs workflows (#64486) 2025-10-07 20:58:12 +00:00
Jeff Bruemmer
7e9bc67b16 Clarify usage of triple braces in config.yml (#64481) 2025-10-07 19:59:29 +00:00
Phoomparin Mano
a822e1dd94 Temporarily remove tooltip loki tests for embedded questions to unblock ci (#64467) 2025-10-08 02:06:44 +07:00
Phoomparin Mano
9eb0ae7700 feat(embed-js): add the Metabot experience to embed wizard (#64388) 2025-10-08 01:07:30 +07:00
Noah Moss
8a4a4273a7 fix local test failure by sorting related_table ids in metabot tool response (#64464) 2025-10-07 15:41:55 +00:00
lbrdnk
2375d46cbb Ajust e2e runner options (#64377) 2025-10-07 16:53:18 +02:00
Noah Moss
4215b09ac7 Split fields returned to metabot for cards/models into core fields and related_tables (#64385)
* Split fields returned for cards/models into core fields and related_tables

* Update tests, and fix implementation to always include :related_tables

* typo

* fix kondo

* add separate with_related_tables flag to get-table-details API

* add test for new flag

* fix malli recursive schema

* add back query-needed?

* support related-tables when fetching table details as well, not just models

* add get-table-details-related-tables-test

* don't overwrite tyler's 404 fix
2025-10-07 13:59:40 +00:00
github-automation-metabase
be91884957 Update generated docs (master) (#64440)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-07 09:44:57 -04:00
Mahatthana (Kelvin) Nomsawadi
dae7df1c71 Fix long embedding test time (#64449)
* Fix long embedding test time

* Fix failed tests
2025-10-07 19:13:14 +07:00
Kamil Mielnik
8f037b0036 Add "Local symbol" option in "Currency label style" visualization setting (#64360)
* Extract lazy-evaluation of currencyMapCache to an iife

* Add getCurrencySymbolNative

* Add narrow symbol support

* Update unit tests

* Add test

* Add e2e test

* Fix issue with current value not being shown
2025-10-07 18:23:37 +07:00
Duarte Laia
0e247c2772 Fix #54317: Object detail navigation state doesn't reset (#55238)
* Fix #54317: Object detail navigation state doesn't reset
Added a verification that caps the selected object index.

* Fix #54317: Changed useState and reseted index.
Now using useEffect and reseting to the first index.

* Fix #54317: Added an e2e test

* Adjust test to new filters

---------

Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub.chodorowicz@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub@chodorowicz.com>
2025-10-07 12:00:54 +01:00
Fraser
d14019cd02 Delete skipped e2e download test that has BE tests (#64442) 2025-10-07 22:48:07 +13:00
Uladzimir Havenchyk
a5d6067de1 chore: migrate renderer_utils from moment to dayjs (#64413) 2025-10-07 12:40:11 +03:00
Timofey Kachalov
8f9a72345b Minor refactoring of services.js (#64408) 2025-10-07 13:18:01 +04:00
Romeo Van Snick
39e2e551dc Simplify worker loops 2025-10-07 17:02:26 +11:00
Romeo Van Snick
7606803604 Add termination better 2025-10-07 16:30:53 +11:00
Romeo Van Snick
7fd1c79dad Ignore results for aborted runs 2025-10-07 16:04:04 +11:00
Romeo Van Snick
1a7017612c Use types from pyodide 2025-10-07 15:41:05 +11:00
Romeo Van Snick
4420d0c963 Add pyodide 2025-10-07 15:28:16 +11:00
Romeo Van Snick
3a00a330bc Handle errored out workers 2025-10-07 15:21:56 +11:00
Romeo Van Snick
22211b18e8 Fix types 2025-10-07 15:10:14 +11:00
Romeo Van Snick
bc5bcff995 Improve waitFor error handling 2025-10-07 15:05:51 +11:00
Romeo Van Snick
27456e9669 Split up code further 2025-10-07 14:42:30 +11:00
Romeo Van Snick
13854b5c49 Work of shared types for Worker and Manager 2025-10-07 14:35:36 +11:00
Romeo Van Snick
143ed4974c Simplify packages 2025-10-07 14:20:37 +11:00
Romeo Van Snick
bca7756059 Move pyodide worker into a separate folder 2025-10-07 14:18:49 +11:00
Fraser
f14ae0297b Unskip working pivot-tables test (#64349) 2025-10-07 13:35:59 +13:00
Vamsi Peri
952aeefd58 Dark mode (#64016)
* js source of truth for colors

* use more betterer colors

* keyboard shortcut for toggling dark mode

* Adds colorConfig for defining a light and dark color for each color variable

* Copies over dark colors from `dark-mode` branch (excluding variables that don't exist in colorConfig`

* Ports other style changes from `dark-mode` branch

* Revert 3301ed93693

* Ports mantine theme logic from `dark-mode` but uses SSOT colorConfig instead of SEMANTIC_COLOR_SCHEMES

* Fix TS errors

* Fix text color and random white bg on permissions table

* Removing a bunch of usages of JS color... probably breaking things

* Updates mantine color scheme when resolvedColorScheme changes

* a bunch more

* fix progress bars. shame on Nick

* Stubs out forcing light mantine theme when isEmbedding (since it has its own dark mode)

* Fix hard-to-read dark mode straggler caused by one-off bg color

* add orionAlphaInverse colors

* make lighthouse illustration work with CSS vars

* Fixes hover states of query builder header buttons in dark mode

* Updates PivotTables in dark mode to behave similarly to night mode

* Fix upsell CTA hover color in dark mode

* Tweaks admin nav dark mode color

* some small fixes

* Fixes some incorrect brand color values when white-labeling

* Tweaks admin nav bar colors and uses same colors on dark mode as light mode (if it ain't broke...)

* Fix gauge visualization text/input colors in dark mode

* Makes things legible and more consistent in query builder in dark mode

* Fixes a few filter chip stragglers in dark mode

* metabot visits the dark side

* Use ColorSchemeToggle for dashboard night mode button

* Prevents dashboard from using night mode when theme=night is set in the hash

* Update color.ts

* Revert "Prevents dashboard from using night mode when theme=night is set in the hash"

This reverts commit 06a504c088e31c60aca7c7550aa24a0f32edba6c.

* set color scheme for scrollbars

* hard to see toggle in database info

* Embedding and other fixed

* fix blue brand

* Uses canonical dark mode for dashboard night mode and static embedding's dark mode

* Fixes issue where Static Embedding preview pane doesn't show checkerboard background when "Dashboard background" is turned off

* Updates find-never-defined-css-variables.ts so it looks for defined variables in colors.ts. Removes references to now-removed base colors.

* Fixes some TS errors

* happy-ish static viz

* only resolve to color var if name is known

* type corrections, removing auto color scheme

* Passes storybook theme arg to ThemeProvider

* add konami code shortcut for Vamsi

* Fix dashboard context TS errors

* Fix runtime warning

* Prevents whitelabel colors from being used in colors.ts when token lacks whitelabel feature. Updates `filter` and `summarize` colors to use whitelabel value if present.

* re-enable updateColors

* happy types

* Updates storybook renderer to work with stories that set the theme via theme: "dark"

* Fix issue where DatesRangeSdk story doesn't pick up brand color

* green unit tests?

* Reverts unnecessary change carried over from original `dark-mode` POC which changed some loki/storybook backgrounds

* Fix issue where theme switching themes in Question embed previews doesn't appear to do anything

* handfull of e2e suites

* Revives some `theme` infrastructure needed to support `theme=transparent`

* Restores SdkError colors on dark mode (#64306)

* happy unit and e2e tests?

* Fix lint errors

* feat(sdk-bundle): use existing tooltip configuration for dark mode (#64325)

* fix card shadow crash

* backdrop color fix

* Refines ColorSchemeToggle. Color scheme is "auto" by default. When "auto", color scheme is automatically updated when browser/device settings is changed. Switching to the theme that's defined as the browser/device preference will set the color scheme to "auto".

* Adds clarifying "(system preference)" to color scheme toggle tooltip

* embedding e2e, unit tests

* Fix TS error

* update colorConfig for sdkThemeProvider

* force e2e to run in light mode

* Fix embedding-sdk:docs:generate error

* Updates ThemeProvider to ignore  from hash if we're outside of static embeds. This prevents old night mode dashboard urls from messing with the new dark mode.

* Fix issue where dark mode shortcut isn't pulling in the latest values (not toggling right)

* Replace hardcoded value with already-defined constant

* fix quotes in css

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

* use firefox compatible scale

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

* fix css quotes

* fix color scheme toggle

* fix test

* fix conflict

* update test

* PR Feedback

* fix embedding homepage flicker

* e2e adjustment

* adding text-hover, fixing checkbox border

* setup.cy green plz

* e2e test for toggling color scheme

* e2e plz

* type check

* e2e adjustment

* Update Loki Snapshots

* test colors in RGB

* OS check for shortcut

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: AlessioLaiso <7041012+AlessioLaiso@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-06 20:23:21 -04:00
Romeo Van Snick
186aa9e644 Add types to Pyodide worker 2025-10-07 10:19:48 +11:00
Romeo Van Snick
1c92dfb462 Proxy webpack dev server 2025-10-07 10:13:18 +11:00
Romeo Van Snick
9cae2a5080 Use worker in webpack 2025-10-07 10:13:18 +11:00
Nemanja Glumac
3dffc9d900 Parameterize cloud-add-on API (#64424)
Instead of hard-coding a "metabase-ai" as the only add-on,
we're now parametrizing this endpoint to accept different
product types, which translates into buying different add-ons.
2025-10-07 00:06:11 +02:00
Fraser
09d2689976 Fix merge e2e timings step (#64405) 2025-10-07 10:48:44 +13:00
dpsutton
f6162a0cce Alternative fix for internal queries (#64376)
* Alternative fix for internal queries

reenable the admin screen for http://localhost:3000/admin/tools/errors

I know we aren't supposed to look at any piece of a query, including
type here, but there are a few reasons i'm doing so.

1. i don't know of any predicates in mbql lib for this
metabase.lib.core doesn't have a `native?` predicate, nor an `mbql?`
predicate. It does seem have predicates about stages but that doesn't
seem applicable here
2. even if it _did_, the internal query is not recognized by lib, so we
then have to teach it internal queries which means the other PR (#64375)
has to be implemented either way, defeating the purpose of this very
simple PR.

```clojure
user=> (metabase.lib.core/any-native-stage? {:limit 1,
                                             :type :internal,
                                             :fn "metabase-enterprise.audit-app.pages.queries/bad-table",
                                             :args [nil nil nil "last_run_at" "desc"],
                                             :offset 0,
                                             :parameters []})
Execution error (ExceptionInfo) at metabase.lib.walk.util/fn$fn (util.cljc:72).
Invalid input: {:lib/type ["missing required key, got: nil"], :stages ["missing required key, got: nil"]}
```

Why aren't there tests?
🤠
Want to contrast the two approaches first. Happy to backfill tests once
the approach is agreeable. This approach here is _very_ simple and lets
the working qp approach continue working without disturbing
metabase.lib. This seems pretty nice because ultimately these internal
queries should/will be replaced. But in the meantime, do we want to
teach lib about them, or just skirt it altogether?

* test that api works for these queries

* enable feature in test
2025-10-06 16:22:02 -05:00
John Swanson
b9b78a2f60 Show audit links for non-admins with perms (#64201)
If a user isn't an admin but has permission to view the Usage Analytics
collection they should see links in the card sidebar.
2025-10-06 13:39:41 -07:00
Timofey Kachalov
1a28ee25c3 refactor(embed-js): Refactor EmbedJS wizard to prepare it for No-user embedding (#64411) 2025-10-06 23:50:20 +04:00
Edward Paget
54919da812 Remove parallel annotation from tests (#64386) 2025-10-06 18:43:43 +00:00
Alex Yarosh
11fec69c5e docs: price change (#64426) 2025-10-06 14:17:23 -04:00
Dan Stone
d12930529f Add /ee/python-transforms/test-run to preview a run (#64362)
The python code is executed by the runner but its output is not saved back. The endpoint blocks
until the output is received.

Any objects in S3 should be deleted before the request returns (or will otherwise be collected via retention)

Limits:
- Run timeout is set to 60 seconds
- Samples up to 100 rows from each input table.
- Outputs up to 100 rows from the python output.
2025-10-06 17:25:10 +01:00
Nicolò Pretto
249e0a0d87 fix(modular): enable external click behavior; fallback to drills for internal click behaviors (#64320)
* fix(modular): enable external click behavior; fallback to drills for
internal click behaviors

* remove cy.pause
2025-10-06 17:48:16 +02:00
lbrdnk
ba8843298e Avoid use of analytics content for suggested prompts (#64370)
* Avoid use of analytics content for suggested prompts

* Docstring
2025-10-06 17:41:49 +02:00
Braden Shepherdson
33db17c7ed [QP] Push required implicitly joined fields down through stages (#64305)
Fixes #63245.

Add `:reversed? true` option to `lib.walk/walk-stages` that reverses the order.

Then use that option for `qp.middleware.add-implicit-joins/second-pass`, since that `second-pass`
is about making sure if stage N needs an implicitly joined column from the previous stage, that the
previous stage actually returns it. #63245 happens when the join clause and usage are 2+ stages apart.
Flipping the iteration order will push the need for the implicitly joined column through as many stages
as necessary.
2025-10-06 10:56:39 -04:00
Marcos
471b6f57e5 Fix wrong timezone in "exclude hours" filters (#64290)
* use local datetime instead of zoned  datetime when creating exclusion filters from parameters

* use local datetime instead of zoned datetime when creating exclusion filters from parameters
2025-10-06 11:10:59 -03:00
Denis Berezin
f7183cf1ca Fix card duplication on move to before flexcontainer (#64205) 2025-10-06 17:30:09 +04:00
github-automation-metabase
8666f82edb Bump io.github.metabase/hawk from 1.0.12 to 1.0.13 (#64395)
Inspect dependency changes here:
2025-10-06 13:29:07 +00:00
Phoomparin Mano
400b10f74c feat(sdk-bundle, embed-js): add metabase-metabot custom element for Embed JS (#64144) 2025-10-06 19:03:01 +07:00
Dan Stone
0d7e892036 Remove high cardinality run-id labels (#64358)
Poor prometheus
2025-10-06 12:49:05 +02:00
Timofey Kachalov
573b3c61a2 refactor(sdk-bundle): Adjust StaticQuestion and SqlParametersList visuals (#64313) 2025-10-06 14:16:35 +04:00
Romeo Van Snick
127b23d986 Add e2e test for Python runner 2025-10-06 19:49:00 +11:00
Nemanja Glumac
0af38ef8f0 Delete unused string util from metabase lib (#64389) 2025-10-06 09:38:55 +02:00
Mahatthana (Kelvin) Nomsawadi
7fcd8b3ef7 fix(sdk): Fix SDK TSC errors (#64328)
* Configure ESLint to prevent test files going into SDK build

* Fix SDK build to not include test files

* Fix the config to allow __support__/metadata

* Revert a file I thought was a test file

* Make rules consistent

* Clean up tsconfig pattern

* Make the error message less repeatable
2025-10-06 03:30:12 +01:00
Phoomparin Mano
38260ca608 Remove unused EmbeddingSetup components and hooks (#63841) 2025-10-04 07:05:14 +07:00
Edward Paget
e75dd496b8 fix: add test for join behavior for 64317 fix (#64335) 2025-10-03 15:34:01 -05:00
Edward Paget
c2bea1ca8a feat: card deep links in pulses (#61794)
* feat: card deep links in pulses

* fixup! new fn signature for render-notifications
2025-10-03 15:31:27 -05:00
Nemanja Glumac
52e3cf2142 Replace and remove the deprecated space utility (#64378) 2025-10-03 21:32:37 +02:00
Uladzimir Havenchyk
5b0164a622 chore: replace moment-timezone with dayjs for main app (#63334) 2025-10-03 18:01:51 +00:00
lbrdnk
cebbfb235f Fix localization number separators (#64300)
* Fix incorrect separator on FE and add guard to setting

* Reproduction

* when-some

* Add FE test

* naming

* Update frontend/src/metabase/admin/settings/components/widgets/FormattingWidget.unit.spec.tsx

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

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-10-03 19:25:52 +02:00
Roman Abdulmanov
f69789d465 removed triage notifications (#64369) 2025-10-03 16:18:23 +00:00
lbrdnk
e2334d688a Enable copying of iframe cards (#64232)
* Enable copying of iframe cards

* Use display to decide iframe type

* Add iframe card test
2025-10-03 17:25:05 +02:00
Stas Gavrylov
b71caeacdf WRK 905 Allow commenting on unsaved documents (#64237)
* WRK-905: Allow commenting on an unsaved document

* Fix e2e tests

* Remove 'disabled' prop from CommentsMenu. Remove force click in comments test

* Allow editing document when comments sidebar is opened

* Fix linting

* Fix e2e tests

* Address PR comments. Allow charts editing when comments sidebar is open
2025-10-03 16:32:20 +02:00
Jakub Chodorowicz
0fee338d56 Fix: cannot interact with DashCard actions panel while in edit mode on mobile devices (#64356) 2025-10-03 16:07:16 +02:00
github-automation-metabase
1216cee2ae Update generated docs (master) (#64348)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-03 08:31:04 -04:00
Sébastien
9f1fb57177 Closes EMB-411 no more transparent cell background by default (#64288)
* Closes EMB-411 no more transparent cell background by default

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-03 11:44:04 +02:00
Sébastien
1c18e1023a Closes EMB-854 actually escape the single quote (#64323) 2025-10-03 11:43:37 +02:00
Romeo Van Snick
62917d13bc Handle python shared libraries 2025-10-03 18:12:49 +10:00
Romeo Van Snick
47720ac7dc Allow adding custom libraries to Pyodide 2025-10-03 17:59:51 +10:00
Romeo Van Snick
003c9e63b3 Remove Pyodide status indicator 2025-10-03 17:57:56 +10:00
Romeo Van Snick
5c9d18b96a Render error traceback in a more readable way 2025-10-03 17:48:42 +10:00
Romeo Van Snick
054c0477c0 Remove DataFetcher 2025-10-03 17:43:08 +10:00
Romeo Van Snick
c8da77672c Remove any 2025-10-03 17:41:41 +10:00
Romeo Van Snick
7360cd88b6 Remove pyodide dependency 2025-10-03 17:38:53 +10:00
Romeo Van Snick
55c789fa26 Remove downlaod script for pyodide 2025-10-03 17:34:36 +10:00
Romeo Van Snick
a93959a4c5 Pass args as kwargs and wrap them in a dataframe 2025-10-03 17:33:52 +10:00
Romeo Van Snick
0e1bfe79f2 Add helper to fetch sample data and use that instead of the service 2025-10-03 17:26:27 +10:00
Romeo Van Snick
1efe3a5675 Move transform related wrapper out of python worker pool 2025-10-03 17:04:41 +10:00
Romeo Van Snick
6ecbad3323 Move Python transform test to hooks 2025-10-03 16:58:17 +10:00
Romeo Van Snick
8ece3416e3 Handle abortion properly 2025-10-03 16:54:35 +10:00
Romeo Van Snick
c360c2f457 Add useRunPython hook and use that in the test python hook 2025-10-03 16:51:45 +10:00
Romeo Van Snick
63b43a98d5 Improve python script by wrapping columns in JSON 2025-10-03 16:11:10 +10:00
Romeo Van Snick
d4f385694f Handle newlines in stdout/stderr 2025-10-03 16:02:40 +10:00
Phoomparin Mano
8cb9ca883d Change embed flow tracking to track step completions for funnel analysis (#63973) 2025-10-03 12:55:01 +07:00
Romeo Van Snick
a3d7c7e9f3 Handle errors in script 2025-10-03 15:53:30 +10:00
Phoomparin Mano
384d0b5d3b Update alignment and copy for embedding hub (#64279) 2025-10-03 12:06:24 +07:00
Romeo Van Snick
96ab264d7a Pick worker that is ready in pool 2025-10-03 13:38:49 +10:00
Romeo Van Snick
59ebd75cec Remove unused imports 2025-10-03 13:28:04 +10:00
Tyler Plude
1561702bdb Return error string in response when model ID is a question instead of 404 (#64342) 2025-10-02 17:25:51 -07:00
Romeo Van Snick
1ff9264e4c Disable undefined variable lint 2025-10-03 09:58:57 +10:00
Romeo Van Snick
692acf2531 Rename manager to pool 2025-10-03 09:56:39 +10:00
Romeo Van Snick
e0d12b32e4 Make packages configurable for the worker 2025-10-03 09:55:21 +10:00
Romeo Van Snick
b47e6f4313 Import packages when initializing 2025-10-03 09:47:17 +10:00
Riley Thompson
4d0eef7217 Store transform create/updates in revision table (#64247)
* store transform revisions

* Add tests

* remove unneeded arity

* fix whitespace

* include impl.transform in revisions.init

* move transform test to enterprise folder

* use =? and check unneeded keys were removed

* revert =? use

* dissoc source from transform comparison
2025-10-02 18:40:59 -04:00
Tyler Plude
cc6827ae8c [METABOT] Use limit in final search response (#64336)
* Limit default 50 search results

* tweak
2025-10-02 14:20:26 -07:00
ignacio
08dffba554 minimal change to dashboard caching steps (#64052)
* minimal change

* whoops

* whoops

* Update docs/configuring-metabase/caching.md

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Update docs/configuring-metabase/caching.md

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-10-02 21:12:18 +00:00
Jeff Bruemmer
18b59c1b4d docs - notes on Metabot feedback (#64307)
* notes on feedback

* edit

* link
2025-10-02 17:02:18 -04:00
Anderson
d56be957f0 Show 'See it' link next to 'Saved' button after x-ray is saved as dashboard (#64265)
* Show 'See it' link next to 'Saved' button after x-ray is saved as dashboard

* Use Flex and Group mantine components

* use cy.log instead of JS comments

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>

* reverse the order of e2e assertions/actions

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>

* Fix tests

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2025-10-02 17:09:05 -03:00
Edward Paget
6631ed5389 chore: Remove unused column-level middleware (#64326)
* chore: Remove unused column-level middleware

* fixup! update docstring
2025-10-02 19:55:30 +00:00
Noah Moss
16c4a16025 Fix edge case in to-tsquery-expr (#64330) 2025-10-02 19:15:21 +00:00
Edward Paget
2219786d93 fix: validate ldap server email before save (#62616)
Prevents the user from getting an ugly assertion error on login if the
ldap is misconfigured so we can't read a real email from the server response.
2025-10-02 18:46:33 +00:00
Phoomparin Mano
93052b8a8e Hide the step number circle in the setup flow when we only have one step (#64292) 2025-10-03 01:14:00 +07:00
Sébastien
e01cbfc87e Closes EMB-854 escape single quotes in embed code snippets (#64242)
* Closes EMB-854 escape single quotes in embed code snippets

* .

* .

* cleanup
2025-10-02 15:54:37 +02:00
Oleksandr Solovyov
899d6edb3c Mage run tests via nrepl (#64236) 2025-10-02 16:48:59 +03:00
Romeo Van Snick
bdd9dccdc9 Do not include micropip 2025-10-02 22:55:10 +10:00
Romeo Van Snick
35d5f824f9 Remove unused context 2025-10-02 22:54:44 +10:00
Romeo Van Snick
c99b613fb3 Add cancellation to pyodide worker 2025-10-02 22:54:44 +10:00
Romeo Van Snick
5fc1f7309f Distinguish worker and workermanager 2025-10-02 22:54:44 +10:00
Kamil Mielnik
5705ba7f81 Move SmartScalar subcomponents to separate files (#64283) 2025-10-02 19:44:59 +07:00
Romeo Van Snick
b02eb58a79 Remove initialize step altogether 2025-10-02 22:31:51 +10:00
Romeo Van Snick
337f5bb867 Automatically terminate worker after run 2025-10-02 22:21:40 +10:00
Romeo Van Snick
958390151e Handle errors in the worker 2025-10-02 22:20:08 +10:00
Romeo Van Snick
09377ed5e9 Remove crazy serialization code 2025-10-02 22:15:48 +10:00
Romeo Van Snick
8334d3d91b Simplify worker flow 2025-10-02 22:06:49 +10:00
Cam Saul
0261a15e7b QP result metadata should always populate :lib/desired-column-alias (#64063)
* QP result metadata should always populate `:lib/desired-column-alias`

* Don't truncate desired column aliases for Table returned columns
2025-10-02 09:03:54 +00:00
Mahatthana (Kelvin) Nomsawadi
02cec9f38d fix(sdk): Allow token withoutexp, but raise a warning (#64238)
* Allow token without exp, but raise a warning

* Fix typing

* Fix wrong doc link anchor

* Fix doc link accessible label

* Add a test

* Fix sso endpoint calling repeating when jwt doesn't contain `exp`

* Fix unit tests

* Fix test for real!

* Fix test name typo

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

* Use correct terminology "session"

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

* Fix showing no EXP claim warning when the token is being fetched

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

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-10-02 10:01:57 +01:00
Romeo Van Snick
66f7eb7039 Wrap case in block 2025-10-02 18:55:14 +10:00
Romeo Van Snick
d228328a29 Load packages on initialization 2025-10-02 18:47:10 +10:00
Cam Saul
8fa9204d57 Fix formatting for native-query (#64291) 2025-10-02 01:43:18 -07:00
Romeo Van Snick
cd8d1a8348 Remove unused loadPackages handler 2025-10-02 18:38:24 +10:00
Romeo Van Snick
0c0b1f7a4b Clear globals 2025-10-02 18:36:16 +10:00
Romeo Van Snick
4e168d7e8c Use pyodide builtins to capture stdout/stderr 2025-10-02 18:36:03 +10:00
Nicolò Pretto
88229c321e fix(modular): links and type/URL columns should be rendered as clickable (#64243)
links
2025-10-02 10:19:43 +02:00
Romeo Van Snick
8b92275ceb Enable Python debugger by default 2025-10-02 17:09:20 +10:00
Romeo Van Snick
9f04f3ce31 Remove rspack changes 2025-10-02 17:05:17 +10:00
Romeo Van Snick
3ce8af616d Remove unused @pyodide/webpack-plugin 2025-10-02 17:04:47 +10:00
Romeo Van Snick
577aa9ee51 Format worker 2025-10-02 16:52:44 +10:00
Timofey Kachalov
4d0d576c13 feat(sdk-bundle): Add SqlParametersList component for InteractiveQuestion and StaticQuestion (#64187) 2025-10-02 10:24:54 +04:00
Timofey Kachalov
7e4dfde94f Adjust sample apps setup (#64274) 2025-10-02 08:59:05 +04:00
Romeo Van Snick
5b9d0ce9fd Format table values 2025-10-02 14:30:18 +10:00
Romeo Van Snick
e800c0673d Improve error / output renderer 2025-10-02 14:18:59 +10:00
William
85fc7cb3fd Dependencies tracking (#63248) 2025-10-01 22:37:16 -04:00
dpsutton
16dc5bece0 Log errors in downgrades (#64309)
Fixes https://github.com/metabase/metabase/issues/62179

Before (and bad) (wordwrap introduced for clarity):
```
2025-08-14 16:17:36,662 WARN app-db.liquibase :: The following
changesets were not rolled back. Likely because they are not in the
changelog file: v56.2025-06-05T16:48:48, v56.2025-06-06T20:11:53,
v56.2025-06-06T20:11:54, v56.2025-06-06T20:11:55,
v56.2025-06-06T20:11:56, v56.2025-06-06T20:11:58,
v56.2025-06-13T15:00:00, v56.2025-07-07T08:02:43,
v56.2025-07-17T20:11:55, v56.2025-07-17T20:11:56 2025-08-14 16:17:36,662
INFO liquibase.logging :: Successfully released change log lock ```
```

And now:

```
2025-10-01 16:00:19,326 INFO app-db.liquibase :: Rolling back app database schema to version 55
2025-10-01 16:00:19,326 INFO app-db.liquibase :: Going to roll back changeset v56.2025-07-17T20:11:56
Rolling Back Changeset: migrations/056_update_migrations.yaml::v56.2025-07-17T20:11:56::edpaget
2025-10-01 16:00:19,328 ERROR app-db.liquibase :: Error rolling back migration v56.2025-07-17T20:11:56
liquibase.exception.RollbackFailedException: liquibase.exception.DatabaseException: ERROR: column "jwt_attributes" does not exist
  Position: 41 [Failed SQL: (0) UPDATE core_user SET login_attributes = jwt_attributes WHERE sso_source = 'jwt']
  	at liquibase.changelog.ChangeSet.rollback(ChangeSet.java:1041)
        ...
Caused by: liquibase.exception.DatabaseException: ERROR: column "jwt_attributes" does not exist
  Position: 41 [Failed SQL: (0) UPDATE core_user SET login_attributes = jwt_attributes WHERE sso_source = 'jwt']
	at liquibase.executor.jvm.JdbcExecutor$ExecuteStatementCallback.doInStatement(JdbcExecutor.java:520)
       ... omitted
       ... 65 more
Caused by: org.postgresql.util.PSQLException: ERROR: column "jwt_attributes" does not exist
  Position: 41
	at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2734)
	... 70 more

2025-10-01 16:00:19,330 WARN app-db.liquibase :: The following
changesets were not rolled back. Likely because there were errors in
rollback (v56.2025-07-17T20:11:56): v56.2025-06-06T20:11:53,
v56.2025-06-06T20:11:54, v56.2025-06-06T20:11:55,
v56.2025-06-06T20:11:56, v56.2025-06-06T20:11:58,
v56.2025-06-13T15:00:00, v56.2025-07-07T08:02:43,
v56.2025-07-17T20:11:55, v56.2025-07-17T20:11:56 2025-10-01 16:00:19,330
INFO liquibase.logging :: Successfully released change log lock
```

How i recreated:
connected to a jar:
```
MB_DB_CONNECTION_URI="postgres://dan:password@localhost:5432/downgrade-checks" MB_JETTY_PORT=2999 java "$(socket-repl 6000)" -jar $JARS/1.56.6.2.jar
```

```sql
downgrade-checks=# alter table core_user drop column jwt_attributes;
ALTER TABLE
```

this will make a downgrade fail:
```yaml
  - changeSet:
      id: v56.2025-07-17T20:11:56
      author: edpaget
      comment: |
        Add sync login_attributes with jwt_attributes, we need to replace jwt_attributes
        with login attributes for users with sso_source jwt so that they will get the new
        behavior where login_attributes can override jwt_attributes
      changes:
        - sql: >-
           UPDATE core_user
           SET jwt_attributes = login_attributes, login_attributes = '{}'
           WHERE sso_source = 'jwt';
      rollback:
        - sql: >-
           UPDATE core_user
           SET login_attributes = jwt_attributes
           WHERE sso_source = 'jwt';
```

This will fail as the `jwt_attributes` column has been removed.

```
Error rolling back migration v56.2025-07-17T20:11:56
liquibase.exception.RollbackFailedException: liquibase.exception.DatabaseException: ERROR: column "jwt_attributes" does not exist
  Position: 41 [Failed SQL: (0) UPDATE core_user SET login_attributes = jwt_attributes WHERE sso_source = 'jwt']
```

And then connect to the jar again, redefine the changes here, and run

```clojure
  (let [data-source (metabase.app-db.core/data-source)]
    (with-open [conn (.getConnection ^javax.sql.DataSource data-source)]
      (with-liquibase [liquibase conn]
        (rollback-major-version! conn liquibase false))))
```
2025-10-01 17:59:50 -05:00
Nathan Voxland
3f15dcd0ad Better error handling when sync-tracking-atoms fails (#64132) 2025-10-01 16:42:11 -05:00
Phoomparin Mano
6e17e96bf0 feat(sdk-bundle): stacked and sidebar layouts for metabot questions (#64142) 2025-10-02 04:03:24 +07:00
Fraser
59dc6a1376 Remove skipped dashboard toast e2e tests (#64266) 2025-10-02 09:36:51 +13:00
John Swanson
4614a37972 Fix u/slugify function's max-length option (#64256)
* Fix `u/slugify` function's max-length option

`u/slugify` url-encoded non-ASCII characters, then took `max-length`
chars off the result.

Both make sense in isolation - but if we're slugifying, e.g., the string
勇士, with max-length 10, this results in:

- first, url encode non-ASCII characters => "%E5%8B%87%E5%A3%AB"
- then, take 10 characters => "%E5%8B%87%"

But a bare `%` character, as in the trailing character above, is not
valid URI syntax.

Discovered in [UXW-666: Users can't download results for questions with
long cyrillic names, error "URL
malformed"](https://linear.app/metabase/issue/UXW-666/users-cant-download-results-for-questions-with-long-cyrillic-names)
but there are probably more cases where this has caused mischief.

* fix test
2025-10-01 11:53:46 -07:00
Alex Yarosh
648039ca1a docs: don't overhype interactive embedding (#64299)
* docs: don't overhype interactive embedding

* Add in-page promo for embedding workshop

Added a promotional section for the embedding workshop.

* Update docs/embedding/interactive-embedding.md

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-10-01 18:46:48 +00:00
Jeff Bruemmer
2804f26f4b fix placeholder (#64240) 2025-10-01 14:30:33 -04:00
Alex Yarosh
158b78fb25 docs: clickhouse cloud (#64296) 2025-10-01 17:49:45 +00:00
Rodrigo López Dato
9b82a4d92d Add explicit import/export direction to serialization errors (#63777) 2025-10-01 20:30:33 +03:00
dpsutton
5fb41fd3b1 lower log level to debug for field ref issues (#64281)
These log lines will now be debug level warnings rather warning level warnings.
```
<lib.normalize>  Error normalizing MBQL 5
<lib.field.resolution>  We tried every trick we could think
<lib.join>  Failed to find matching column in join
```

Intrepid readers will also notice that moved "Resolved field %s to an
expression. ..." to debug as well.
2025-10-01 11:07:06 -05:00
Rodrigo López Dato
db70faad90 Show full timestamp for revision history entries on hover (#63256) 2025-10-01 15:07:42 +00:00
Alex Yarosh
dddf9d679c docs: serializing new entities (#64284)
Added document comments to the list of non-exported entities.
2025-10-01 10:26:54 -04:00
Uladzimir Havenchyk
c6c0bf73dd tests: wait for data in a flaky test (#64267) 2025-10-01 16:13:00 +03:00
John Swanson
c5da59566e Fix downloading tables grouped by datetime->int (#64245)
* Fix downloading tables grouped by datetime->int

The Linear task has a slightly more involved setup. I found that I could
replicate the issue with a slightly simpler setup:

- set up a simple query:
  - select COUNT from ORDERS
  - group by the day of the month
- log in as the sandboxed user
- try to download the card results (as CSV, XLSX, etc)
- see the error

Why does this happen? I found that, for a sandboxed user, the query
results show the "day of the month" column as having

```
         :base_type :type/DateTime,
         :database_type "TIMESTAMP",
         :effective_type :type/Integer,
```

while an admin user sees the same column as having

```
         :base_type :type/Integer,
         :database_type "INTEGER",
         :effective_type :type/Integer,
```

This seems bizarre and worth looking more into, but honestly shouldn't
really matter - if the effective type is an integer, we certainly
shouldn't be formatting it as a datetime.

`field-is-type?` is only used for checking whether a field is temporal
for formatting purposes, so I think this is a relatively low risk
change, and note that `metabase.lib.types.isa/temporal?` (the
replacement suggested by the deprecation notice for
`metabase.types.core/temporal-field?`) returns `false` for both
cases.

[UXW-660: Pivot tables with integer breakout columns fail to download as formatted XLSX for sandboxed tables](https://linear.app/metabase/issue/UXW-660/pivot-tables-with-integer-breakout-columns-fail-to-download-as)

* Write a test
2025-10-01 05:37:26 -07:00
Kamil Mielnik
f914bf8714 Update table editing e2e tests to not add or remove rows in Sample Database (#64273)
* Update the row deleting test to use writable db

* Update the row adding test to use writable db
2025-10-01 06:16:52 -05:00
Nicolo-Maria
5a7469143b poc: pyodie test mode 2025-10-01 12:31:22 +02:00
Ngoc Khuat
448e9c8278 hide the python runner settings if hosted (#64233) 2025-10-01 08:18:44 +00:00
Nicola Mometto
0ac7bce92b Python runner timeouts (#64095)
* add python runner timeout as setting

* set timeout status

* add timeout status test

* appease kondo

* proper script

* Fix if: expr in upload runner logs

* Fix python runner log name

* Remove setting qualifier

* Add python-runner-timeout-seconds to FE settings type

* Ensure premium feature enabled so setting can be changed

---------

Co-authored-by: Dan Stone <wotbrew@gmail.com>
2025-10-01 09:15:08 +01:00
Romeo Van Snick
ccd8a11ee7 Add context to Save verb and fix similar translation issues (#64077)
* Add context to Save verb

* Add key

* Extract button from nested t

* Find other instances of nested c(...).jt`...${<x>...</x>}...` calls and unnest them
2025-10-01 17:58:46 +10:00
Ngoc Khuat
5164a08b2a Do not run transform test in postgres mysql (#64241) 2025-10-01 04:24:04 +00:00
Romeo Van Snick
e50317d86d Avoid extra interval with single interval in Bar chart (#64175)
* Remove extra interval tick when there is only one interval

* Add repro for metabase#63671

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-01 13:31:05 +10:00
Nathan Voxland
3800f7452a Support dbname for redshift in config files (#64069) 2025-09-30 22:21:49 -05:00
Romeo Van Snick
f89073a6bd Do not show error when loading (#64082)
* Pass isRunning to Visualization

* Hide error when query is running

* Add unit test for metabase#63410
2025-10-01 13:05:11 +10:00
Mahatthana (Kelvin) Nomsawadi
d848a88e64 Fix can't drill SQL questions in embedding SDK (#64083)
* Fix can't drill SQL questions in embedding SDK

* Add tests

* Fix the audit DB should not be able to see SQL

* Fix every CI check failing from updating from master

* Address code feedback, make it more clean

* Fix transducer order
2025-10-01 03:10:46 +01:00
Fraser
356025f41b Unskip issue 42049 reproduction (#63862) 2025-10-01 12:32:49 +13:00
Fraser
a0c2ebd9e9 Delete test for non-existent feature (#63683) 2025-10-01 09:51:40 +13:00
Alex Yarosh
c9bc786c60 remove actions from embedding overview (#64249)
Updated the requirement note for embedding types to clarify that a Pro and Enterprise plan is necessary.
2025-09-30 16:30:50 -04:00
Ramiro Nuñez Dosio
1f024e148d Revise README for clarity and updated links (#64194)
* Revise README for clarity and updated links

Update readme with 

- Product image (TBC which image)
- Update links to latest version (no redirects)
- Add mention of new features (Metabot AI and React SDK)
- Add community section

* Update README.md

Co-authored-by: alexandermkinn <85193003+alexandermkinn@users.noreply.github.com>

* Update README.md

Co-authored-by: alexandermkinn <85193003+alexandermkinn@users.noreply.github.com>

* Update Metabase product screenshot URL

Updated the product screenshot link in the README.

* Update README.md

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

* Update README.md

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

---------

Co-authored-by: alexandermkinn <85193003+alexandermkinn@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeffbruemmer@gmail.com>
2025-09-30 16:05:51 -04:00
Alex Yarosh
7c8a53c4d5 docs: pin shape (#64251)
* pin shape

* Update docs/questions/visualizations/map.md

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

* wording

Clarified limitations on data points for maps and added details about pin types.

* image

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-30 15:15:11 -04:00
John Swanson
bc28d50013 fix: make popular tables clickable (#64208)
Very silly bug, we were just populating the ID with the wrong
thing (`(:database-id table)` instead of `(:db_id table)`), so the FE
couldn't build links correctly.

There was a mismatch between `recent_views` and `popular_items`
endpoints. They have different queries, but are using the same
postprocessing function. So I needed to unify them: both now use
`:db_id`.
2025-09-30 11:31:59 -07:00
Timofey Kachalov
d0af14f90d Fix SegmentedControl colors (#64107) 2025-09-30 20:25:53 +04:00
Eric Normand
6afcf2aed5 Fix ssh tunneling for clickhouse (#63464)
* Fix ssh tunneling for clickhouse

* Remove questionmark

* Use kebab case keys

* Fix kondo;

This is also fixed in https://github.com/metabase/metabase/pull/63645,
so there may be a conflict.

* Don't squash exceptions.

* remove some tests, fix some tests

I removed some tests. Let's be very clear why this is happening. Push
back if you disagree:

```clojure
(deftest clickhouse-connection-fails-test
  (mt/test-driver :clickhouse
    (mt/with-temp [:model/Database db {:details (assoc (:details (mt/db)) :password "wrongpassword") :engine :clickhouse}]
      (testing "`driver/database-supports? :uploads` does not throw even if the connection fails."
        (is (false? (driver/database-supports? :clickhouse :uploads db)))
        (is (false? (driver/database-supports? :clickhouse :uploads nil))))
      (testing "`driver/database-supports? :connection-impersonation` does not throw even if the connection fails."
        (is (false? (driver/database-supports? :clickhouse :connection-impersonation db)))
        (is (false? (driver/database-supports? :clickhouse :connection-impersonation nil))))
      (testing (str "`sql-jdbc.conn/connection-details->spec` does not throw even if the connection fails, "
                    "and doesn't include the `select_sequential_consistency` parameter.")
        (is (nil? (:select_sequential_consistency (sql-jdbc.conn/connection-details->spec :clickhouse db))))
        (is (nil? (:select_sequential_consistency (sql-jdbc.conn/connection-details->spec :clickhouse nil))))))))
```

This test is _GONE_ because it's insane that we are testing that
`conneciton-details->spec` and `database-supports?` is resilient to
opening a connection to a server. That's nuts. We don't do that any
more. Should be the same as if checking `(+ 1 1)` doesn't open a network
connection. We get version information in

```clojure
(def ^:private ^{:arglists '([database])} get-clickhouse-version
  (memoize/ttl
   ^{:clojure.core.memoize/args-fn (fn [[database]] (:details database))}
   (fn [database]
     (sql-jdbc.execute/do-with-connection-with-options
      :clickhouse
      (sql-jdbc.conn/db->pooled-connection-spec database)
      nil
      (fn [^java.sql.Connection conn]
        (with-open [ver-stmt (.createStatement conn)
                    ver-rset (.executeQuery ver-stmt clickhouse-version-query)
                    cloud-stmt (.createStatement conn)
                    cloud-rset (.executeQuery cloud-stmt "SELECT value='1' FROM system.settings WHERE name='cloud_mode'")]
          (cond-> nil
            (.next ver-rset)
            (assoc :version          (.getString ver-rset 1)
                   :semantic-version {:major (.getInt ver-rset 2)
                                      :minor (.getInt ver-rset 3)})

            (.next cloud-rset)
            (assoc :cloud (.getBoolean cloud-rset 1)))))))
   :ttl/threshold default-cache-ttl))

(defmethod driver/dbms-version :clickhouse
  [_driver db]
  (get-clickhouse-version db))
```

We don't need to run this query every time you get a connection spec or
ask if the database supports something. We have the version and if it's
cloud and that's sufficient. The only reason it was opening a connection
was to run the cloud check (`select value=1 from system.settings where
name=cloud_mode`) above.

Also removed:
```clojure
(deftest impersonation-support-check-over-ssh-tunnel-test
  (testing "driver-supports? :connection-impersonation should work through an SSH tunnel (#62377)"
    ;; Use an in-memory SSH server that forwards to the correct port through localhost.
    ;; Since the real database is still reachable locally, it's possible for the driver to ignore the SSH tunnel and
    ;; still connect to the DB. So this test runs twice, once with all correct and once with an incorrect SSH
    ;; password. The latter check should fail (returning false for `driver-supports?`) if the SSH tunnel is being
    ;; respected.
    (mt/test-driver :clickhouse
      (let [username "username", password "password"]
        (with-open [ssh-server (driver.tu/basic-auth-ssh-server username password)]
          (doseq [[correct-password? ssh-password] [[true password] [false "wrong-password"]]]
            (memoize/memo-clear! @#'clickhouse.version/get-clickhouse-version)
            (let [ssh-port (.getPort ssh-server)]
              (with-ssh-tunnel! {:tunnel-enabled true
                                 :tunnel-host "localhost"
                                 :tunnel-auth-option "password"
                                 :tunnel-port ssh-port
                                 :tunnel-user username
                                 :tunnel-pass ssh-password}
                (testing (str "using " ssh-password)
                  (is (= correct-password?
                         (driver/database-supports? :clickhouse :connection-impersonation (mt/id)))))))))))))
```

Again, this is verifying connection resiliency in a call
to `(driver/database-supports? :clickhouse
:connection-impersonation (mt/id))` and ensuring that it uses the ssh
tunnel. This entire concern is gone, and a red flag that it ever
existed.

Changes:
a few tests used the `db` from `with-temp` to do stuff, but now that we
require them to have dbms_version i populated that

in the version check i thought i saw one in test going through with
`dbms-version` and not `dbms_version` so i'm checking both just to be
sure. it's a bit sloppy

* small changes and add back test

* handle dbms-version vs. dbms_version

* fix kondo

---------

Co-authored-by: Riley Thompson <riley@metabase.com>
Co-authored-by: dan sutton <dan@dpsutton.com>
Co-authored-by: Riley Thompson <rileythompson99@gmail.com>
2025-09-30 11:53:45 -04:00
yaojie
99d7d54af3 Set send-server-version? to false to hide Server version from response headers (#57257)
* Set send-server-version? to be false by default

* Update test
2025-09-30 16:40:19 +01:00
Dan Stone
1610538386 MariaDB transform cancellation fix (#64092) 2025-09-30 16:13:41 +01:00
Bergbok
1d94009c3d Update broken link in README (#63000) 2025-09-30 11:12:31 -04:00
Jeff Bruemmer
b8360b6da3 docs - document layout (#64209)
* document layout

* do stuff
2025-09-30 14:58:10 +00:00
Oleksandr Solovyov
cb13bdc086 simpler way to set token: mt/with-random-premium-token! (#64188) 2025-09-30 17:06:53 +03:00
Timofey Kachalov
1704f14bda refactor(sdk): Properly reinitialize metabaseConfig watcher for EmbedJS wizard (#64235) 2025-09-30 17:48:14 +04:00
John Swanson
593ecfb952 Use SQL SECURITY INVOKER for mysql views (#62537)
[UXW-263: Aurora MySQL AppDB can't create Metabase Analytics views
without using `SQL SECURITY
INVOKER`](https://linear.app/metabase/issue/UXW-263/aurora-mysql-appdb-cant-create-metabase-analytics-views-without-using)

Updates all the MySQL view creations to use `SQL SECURITY INVOKER`.
2025-09-30 06:07:10 -07:00
github-automation-metabase
611220c5e0 Update generated docs (master) (#64216)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-30 08:56:57 -04:00
Dan Stone
b77f570c57 Add python runner logs as artifacts on failed tests (#64093)
* Factor out setup/log actions for python runner, use in driver tests

* Remove redundant cd

Co-authored-by: Nicolò Maria Mezzopera <nicolo.mezzopera@metabase.com>

---------

Co-authored-by: Nicolò Maria Mezzopera <nicolo.mezzopera@metabase.com>
2025-09-30 11:59:24 +01:00
Timofey Kachalov
8ba64b7bcd fix(sdk): Fix SDK refresh token race-conditions (#64094) 2025-09-30 13:09:58 +04:00
Nicola Mometto
e1dcfdab2e Do not realize objects in memory early for python transform results (#64034)
* partition documents for mongo insert

* feat: s3/read-to-stream

* don't keep files in memory, stream them

* fix tests

* proper types

* slurp conditionally

* replace_existing

* nil safe

* Tweak InputStream lifetimes

* Fix test now read-to-string returns nil

* Fix kondo / reflection

---------

Co-authored-by: Dan Stone <wotbrew@gmail.com>
2025-09-30 09:42:34 +01:00
Timofey Kachalov
5c9b282361 Update typedoc and its plugins versions (#64219) 2025-09-30 11:43:47 +04:00
Oleksandr Solovyov
cf5c7bd4c3 [search] better search for CamelCased tables and dbs (#64043) 2025-09-30 06:20:14 +00:00
Nemanja Glumac
46adff882f Fix metrics-collection e2e flake (#64204)
We're making the assertion a bit more flexible
without losing the confidence that this test
was supposed to give us when it was created.
2025-09-30 07:50:30 +02:00
Cam Saul
87923e1e1d Fix duplicate coercion on custom columns from joins (#63941)
* Fix duplicate coercion on custom columns from joins

* Fix #63991

* Test fixes 🔧

* Another round of test fixes 🔧

* Test fixes 🔧

* Kondo lint fixes 🔧
2025-09-29 22:16:56 -07:00
Romeo Van Snick
5bd544baf5 Fix native transform editor results UI warts (#64081)
* Pass className to native editor

* Add missing border on top of native editor

* Set minimal editor height so the results panel is always visible

* Move initial height calculation to hook
2025-09-30 14:04:22 +10:00
Anderson
f8d410f858 Change dark ClickHouse icon to be yellow (#64213) 2025-09-29 22:57:18 -03:00
Aleksandr Lesnenko
cfa62e4b8b original card description should be provided to visualizer (#64197) 2025-09-30 00:28:07 +00:00
Romeo Van Snick
fa2820320e Fix zoom and hover on map while editing (#64174)
* Add missing import

* Use late-binding for handlers so they can change without having to recreate markers

* Allow isEditing props to re-render Map component

* Allow disabling zoom control on maps

* Allow clicking the Map action buttons

* Disable zoom and hover when in editing mode

* Add repro for metabase#64138

* Fix e2e tests
2025-09-30 09:03:51 +10:00
Romeo Van Snick
33070f6e06 Fix completion results (#64080)
* Do not shrink grid rows in completion results

* Add e2e test for metabase#63711
2025-09-30 09:03:13 +10:00
Denis Berezin
f43c6462d8 Add support for special intl chars for email formatting (#64060)
* Add support for special intl chars for email formatting

* Fix review comments

* Fix unit tests
2025-09-30 00:16:28 +04:00
Brad Anderson
8f4ccdf2ba Fix #63904: Corrects dashcard selector usage (#64140)
* UXW-1766 Fixes issue where getDashboardHeaderParameters looks at all cached dashcards rather than just the ones from the currently viewed dashboard

* UXW-1766 Adds/updates unit tests
2025-09-29 13:20:34 -04:00
Nemanja Glumac
788bf01ea9 Report Metabot feedback directly to Harbormaster (#64040)
We're introducing a new endpoint in metabase/metabase. It sends the feedback to the backend which then (1) fetches the premium token and (2) constructs the correct store api URL with the same feedback as the payload. Our backend acts as a proxy because the api url contains the token and we can't send it from the FE.
2025-09-29 19:06:51 +02:00
Noah Moss
c4de2725e3 Extract native query content for search indexing rather than the entire dataset_query structure (#64125)
* Extract native query content for search indexing rather than the entire dataset_query structure

* remove inline def

* Fix doc string

* Update search spec field-fields logic to support the :fn syntax to fix test

* Remvoe query_type from expected card spec fields as we're no longer using it to detect native query changes

* Address feedback on :fn semantics, and add a more detailed docstring to define-spec macro
2025-09-29 12:17:17 -04:00
Braden Shepherdson
cd0965a299 [Vertica] Support Vertica UUID columns as :type/UUID (#62512) 2025-09-29 15:38:59 +00:00
Uladzimir Havenchyk
95452f41d3 feat: use new detail view in metadata preview (#63968)
* feat: use new detail view in metadata preview

* drop relationships

* fix e2e helper

* use correct '

* make table responsive

* update helper

* adjust values in tests

* use useSampleData

* rework approach

* update helper

* oops, lost changes

* restore test

* let's add table just in case

* another attempt

* responsive

* restore indexes

* rename index -> rowNumber

* show details group in more cases

* remove force: true

* fix index
2025-09-29 17:31:30 +03:00
John Swanson
b323ecd565 Add a timeout for slow LDAP (#63852)
When the LDAP server is slow, we should fall back to normal
authentication.

For now, use a configurable timeout, defaulting to 15 seconds - this
seems on the high side of reasonable.

[UXW-291: When LDAP is configured, then normal email logins can be blocked if LDAP server is slow/down](https://linear.app/metabase/issue/UXW-291/when-ldap-is-configured-then-normal-email-logins-can-be-blocked-if)
2025-09-29 07:08:10 -07:00
Edward Paget
b2939990fc fix: correct filtering for internal collections (#64065)
* fix: correct filtering for internal collections

* fixup! set is_sample flag on archived collection

filter out analytics namespace
2025-09-29 08:25:36 -05:00
Alexander Polyankin
c63dff0d7b Fixes viz settins for details-only columns (#64113) 2025-09-29 09:12:38 -04:00
John Swanson
521eed05c5 Do not URL-encode default redirect URL (#63965)
I think this was just a mistake - there's no need to URL-encode this and
it actually breaks the redirect.
2025-09-29 06:05:13 -07:00
John Swanson
e88afceba9 Index analytics collections (#64064)
These were excluded from the index, but they should really be in there.
2025-09-29 06:04:02 -07:00
John Swanson
ac2003368e When deleting DB, hide cards from search (#64112)
* When deleting DB, hide cards from search

We have a current issue with search: deleting items does not actually
remove them from search.

This is a particularly nasty version of this, because while usually a
delete follows an update (that marks the card as archived,
which *does* remove it from search), in this case we're just deleting
the items directly as part of an `ON DELETE CASCADE`.

This is a bit hacky, but for now we can just mark them as `archived`
before we delete them to hide them from search.

[UXW-602: Search API returns inexisting cards](https://linear.app/metabase/issue/UXW-602/search-api-returns-inexisting-cards)
2025-09-29 06:03:53 -07:00
Timofey Kachalov
1d2fc06b60 feat(embed-js): Add support of fetchRequestToken for embed-js (#64004) 2025-09-29 16:12:43 +04:00
Kamil Mielnik
581c1e7a38 WRK-871 Details view: JSON formatting missing in details view (#63892)
* Format JSON in new detail view

* Use mantine props

* Use Code

* Use CodeEditor
2025-09-29 10:31:59 +00:00
Romeo Van Snick
17a61a81c8 Add missing import (#64171) 2025-09-29 11:17:26 +02:00
Romeo Van Snick
1d699a5fae Use the entities display name if possible (#64076) 2025-09-29 13:32:11 +10:00
Ngoc Khuat
277d1fdaff Skip sync transforms temp table (#64037) 2025-09-28 15:00:43 +00:00
Oleksandr Yakushev
82b3ba1fcc [perf] Optimize metabase.lib.field.resolution/merge-metadata (#62425) 2025-09-28 13:37:56 +03:00
Dan Stone
dd7845cc83 Improve python error feedback capability (#64053)
* Add i18n / formatting to existing log calls

* Cleanup log conveyance to failure :message

* Improve error feedback capability

- Ensure exception messages do not leak to user logs by default 'Something went wrong'
- Exceptions can carry a `transform-message` key to provide a custom failure message (with i18n)
- Defined messaging for:
   - Error during table copy
   - Error during execution
   - Error during writeback

I would like to follow up with additional context in the form of message log entries for further progress / context of any failure.

Logs can be correlated to metabase logs for stack traces or further debugging. Python output remains presented as-is (traceback etc).
2025-09-27 15:31:57 +00:00
Edward Paget
7e7ed1ac9f fix(scim): support patch requests without a path (#64130)
adheres to the standard and accomodates how we can get these requests
from Okta.
2025-09-26 16:18:45 -05:00
Jeff Bruemmer
19387d8d29 add transforms option (#64128) 2025-09-26 16:45:46 -04:00
Alex Yarosh
7ac8feb49b docs: embedding hub changes (#64012)
* embedding hub changes

* more edits

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-26 20:04:08 +00:00
Alex Yarosh
4447e2c6bc expand embedding comparison table (#64071) 2025-09-26 15:47:01 -04:00
Oleksandr Yakushev
8434b23764 [match] Prevent match-lite from extracting common result that depends on uncommon bindings (#64073)
* [match] Prevent match-lite from extracting common result that depends on uncommon bindings

* [match] Fail if match-lite's :guard is provided with incorrect predicate syntax

Also fix its treatment of named functions passed as predicates.
2025-09-26 22:39:26 +03:00
Jeff Bruemmer
be72407fc8 docs - RLS notes (#64111) 2025-09-26 19:34:07 +00:00
John Swanson
e530911305 Correctly render empty series in static viz (#63987)
* Correctly render empty series in static viz

[UXW-1754: Row chart with an empty series fails to send on static viz](https://linear.app/metabase/issue/UXW-1754/row-chart-with-an-empty-series-fails-to-send-on-static-viz)

`getColumnValueFormatter` and `getColumnValueStaticFormatter` had
different behaviors for empty strings, so this worked on the frontend
but failed for static visualizations.

* cleanup

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2025-09-26 11:49:59 -07:00
Noah Moss
ca9ba3390d make u/profile log lines look nicer (#64114) 2025-09-26 18:01:53 +00:00
Oleksandr Solovyov
a947f3cb94 [advanced-config] uppercased letter in users email should not fail (#64109)
fixes #62894
2025-09-26 17:20:39 +00:00
Dan Stone
33de954fcf Temporarily disable python transforms tests for BQ/Snowflake (#64118) 2025-09-26 17:15:34 +00:00
Kamil Mielnik
db79c64d3d DSN-73 Verified badge icon should be correct size and nearer text in model and saved question titles (#63871)
* Fix verified badge styling

* Misalign icons :see-no-evil:

* Remove min width on dashboard caption input

* Fix overflow
2025-09-26 16:14:41 +00:00
Jakub Chodorowicz
3e646a69f3 Move dev instances upsell down on embedding settings pages (#64099) 2025-09-26 17:57:27 +02:00
Sébastien
d6c15aab01 Closes EMB-853 renamed legends get ignored by translation (#64023)
* Closes EMB-853 renmaed legends get ignored by translation

* feedback

* if -> ts-pattern
2025-09-26 16:04:57 +02:00
Jeff Bruemmer
34c224b5f2 docs - verified content (#64067) 2025-09-26 13:28:33 +00:00
Sébastien
568443a99c Closes EMB-407 transparent background download pdf (#63836)
* Closes EMB-407 transparent background download pdf

* e2e

* cleanup
2025-09-26 15:18:24 +02:00
github-automation-metabase
5fe1efe15b Update generated docs (master) (#64078)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-26 06:46:56 -04:00
Alexander Polyankin
894176cf26 Add missing transform filters (#63998)
* Params

* Params

* Params

* Params

* Params

* Params

* Rename param

* Transform params

* Transform params

* Transform params

* Transform params

* Transform params

* Transform params

* Transform params

* Transform params

* fixes

* add a test

* add a test

* add a test

* add a test

* add a test

* Fix field filters for type/TextLike

* Fix polling
2025-09-26 06:39:11 -04:00
lbrdnk
c28f66c961 Add guards to metabot and semantic search job implementations (#64031)
* Fix arity

* Add guards for job implementations

* Adjust test
2025-09-26 10:36:00 +02:00
Kamil Mielnik
85e6e7f779 DSN-74 People page should use tabs instead of radios for active/deactivated control (#63817)
* Inline AdminPaneLayout

* Do not show invite button on deactivated tab

* Simplify

* Use modern button

* Add tabs in People page

* Move mb

* Fix typo

* Make people search input full width

* Move tabs to the top
2025-09-26 15:19:24 +07:00
Kamil Mielnik
d44a2cab66 DSN-67 We could improve the "Scanning for Filter Values" setting (#63887)
* Update scanning schedule form to use new UI components

* Update tests
2025-09-26 15:18:35 +07:00
Brad Anderson
e349faa741 Fix: #60843 Prevents dashboard from being saved when clicking "Discard changes" (#63899)
* UXW-333 Prevents `updateDashboardAndCards` from being called when discarding changes (still called when clicking "Save changes")

* UXW-333 Adds e2e test
2025-09-25 17:40:54 -04:00
Aleksandr Lesnenko
817af7b71d pass lat and lon fields to the tile endpoints as query params (#63533)
* for fetching tiles encode field refs as safe base64

* clojure implementation

* update public api

* pass lat and lon fields in query params

* specs

* fix specs

* update preview endpoints and tests

* clean up previous url safe base64 implementation

* fix specs
2025-09-25 21:11:26 +00:00
Jeff Bruemmer
e8cd58b376 Revise contributor instructions in PR template (#64059)
Updated warning section for first-time contributors.
2025-09-25 20:07:31 +00:00
Brad Anderson
62d7beec2b Fix: #63463 Loosens condition that forces saving to dashboard (#63855)
* UXW-709 When drilling into a dashboard card that had a filter applied, the resulting query can now be saved outside of the original dashboard. "New Question"/"New SQL query" via dashboard edit screen behavior is unaffected (still forces you to save to that dashboard).

* UXW-709 Updates unit tests
2025-09-25 15:55:45 -04:00
Brad Anderson
c2ec56beed UXW-172 Fix is-neg condition (#63905) 2025-09-25 15:54:48 -04:00
Nathan Voxland
5274867997 Log system signals for better debugging (#63780) 2025-09-25 13:56:48 -05:00
Anderson
b5a9d7457f Have a separate email content for user joining through setup invitation (#63778)
* Allow redirect url from password reset page

* Add await when inviting user so that errors will be displayed

* Allow for different email content when inviting user from setup / Set returnUrl param

* Code refinements

* Add backend tests

* Add frontend tests

* Run formatter

* handle email content when invitor's first name is empty/unset
2025-09-25 15:36:08 -03:00
Radoš Milićev
12f4387864 Fix links in CONTRIBUTING.md (#63653) 2025-09-25 14:31:54 -04:00
Jakub Chodorowicz
6b5e3bd646 Prg 154 allow running dev env on a custom port (#63875)
* Allow running dev on custom MB_FRONTEND_DEV_PORT

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>

* Unify port env var naming between JS and Clojure

* Add dev server port info

* Update devenv docs

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

* update docs

---------

Signed-off-by: Jakub Chodorowicz <jakub@chodorowicz.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-09-25 20:18:33 +02:00
José H.
b7c4063dd9 [docs] Add SPARQL driver in community drivers list (#61994) 2025-09-25 13:57:36 -04:00
Anton
49fcc4a40f Fixed misspell in timezones.md (#64041) 2025-09-25 13:52:24 -04:00
Denis Berezin
7fb62b782b Document Layout - add charts side-to-side (#63101)
* Add working table with 2 columns

* Table layout and dnd polishing

* ResizeNode

* Refactor to use grid container

* Add Card node title ellipsification

* cleanup, add min height

* Fix FlexContainer to work with ResizeNode

* Fix empty ResizeNode after card dnd

* Document layout no dnd kit (#63363)

* using tiptap drag and drop

* Fix some issues with dnd

* Add support for resize node, fix styles

* Remove comments

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>

* Fixes after merge comments

* Fix issues with dnd logic

* Fix issue where rearranging columns within a flexContainer didn't respect which side of a cardEmbed we dropped; it always inserted dragged column to the left.

* Fix issue where moving a cardEmbed out of a flexContainer and placing it right after doesn't wrap the card in a resizer

* Fix issues with dropzones and card id

* Fix issue with column resize handlers

* Fix issues with cards previews on dnd

* Feat: UXW-717 Reconcile comments with document layout (#63593)

* UXW-717 Add comment option to cardEmbed menu
* UXW-717 Wires up comment option in cardEmbed menu
* UXW-717 Stubs out CommentsMenu reorganization so logic can be reused inside cardEmbeds (button and menu item)
* UXW-717 Design tweaks per design feedback (and fixes ts error)
* UXW-717 Updates hover state of cardEmbed ellipsis menu trigger per design feedback

* Fix issues with funnel chart and resizer

* Fix issues with column rearrange

* Fix adding third column position

* UXW-739 Adds ResizeNode wrapper to charts added by metabot

* UXW-749 [1/2] Fix: Cutting/copying a chart from a group then pasting it (cmd+v) results in a chart without a resizeNode

* UXW-749 [2/2] Fix: Copying and pasting from one chart to another doesn't preserve the structure correctly

* Refactor dnd logic - consolidate all use cases in HandleEditorDrop

* remove redundant message and add_message icons

* actually remove redundant message icons

* replace references to old icons with new icons

* Fix issue with dropping a card into existing flexContainer

* Fix issue with moving a card from one flexContainer into another

* UXW-748 - Fix broken document when typing with a card selected

* Handle dropping cards onto paragraphs (#63754)

* Handle dropping cards onto paragraphs

* PR Feedback

* cleanup flex containers

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>

* small feedbacks

* breaking up document drop handler

* UXW-689 - add basic e2e tests

* type fix

* loki diff

* Add more e2e tests

* Fix typecheck

* happy types

* passing document.cy.spec

* Fix e2e tests

* e2e test for card resizing

* flex container column resize tests

* Add node deletion e2e tests

* Fix review issues

* Try to fix typecheck

* Refactor useCommentsButtonProps to a react component

* final PR feedback

* fix removing a card via menu

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-09-25 21:08:49 +04:00
Phoomparin Mano
f393237eb9 Adjust link and action button layout for modular embedding cards (#63876) 2025-09-25 23:00:29 +07:00
Alexander Polyankin
48376d3f63 Fix field filters for type/TextLike (#64045) 2025-09-25 15:47:16 +00:00
github-automation-metabase
a67c48a036 Update generated docs (master) (#64017)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-25 10:29:52 -04:00
Alex Yarosh
8c3d77473a docs: renaming sheets columns (#64011) 2025-09-25 10:29:07 -04:00
Kamil Mielnik
9f029dbb2f WRK-900 [Bug] Detail View: related records are messed up in tables with no PK (#63977)
* Add repro for WRK-900

* Hide relationships when there's no PK
2025-09-25 21:07:38 +07:00
Kamil Mielnik
1adaaae66e WRK-899 Detail view: keep fields used as titles & sub-titles in the regular list of fields (#63889)
* Include header columns in the body of detail view

* Update tests
2025-09-25 21:07:07 +07:00
Oleksandr Solovyov
21956d6ab7 [serdes] NativeQuerySnippet collection_id should not prevent export (#63870)
Previously `extract-query "NativeQuerySnippet"` would use standard method for exporting entities, which checks for
collection_id in entity and prevents its export if it's outside requested collections.

While that makes sense for Cards (and we do escape analysis for those), snippets live in their own separate collection
namespace and this logic is not relevant to them. So now we export either those in requested collections _or_
dependencies of cards that are being exported.
2025-09-25 17:03:23 +03:00
Sébastien
fd94a0b0cb feat(sdk-embed): adds onVisualizationChange to InteractiveDashboard and InteractiveQuestion (#63969)
* Closes EMB-152 add onVisualizationChange callback to SDK embedding components

* .

* .

* .

* fixed schema

* height

* .
2025-09-25 15:59:28 +02:00
Nicola Mometto
7b6fbd6374 Python Transforms (#63700)
* cherry pick driver code (#63628)

* cherry pick driver code

* update changelog

* add type->database-type unit tests

* kondo

* create/insert table

* insert-from-jsonl test

* missing rename-tables for snowflake

* extend rename-tables-test to more drivers

* line breaks

* add driver python transform feature

* handle review comments

* kondo

* feat: replace string->val with a more generic insert-col->val

* remove non transactional impls

* chore: docsstrings

* TODO

* extra test

* fix extra test

* test all base-types

* fix sqls

* setup ci properly (#63693)

* S3 transport layer for python-runner (#63697)

* Add s3 dependencies (#63706)

* port prometheus/instrumentation (#63631)

* port prometheus metrics

* port instrumentation

* instrument existing transform paths

* wider buckets

* remove nil handling

* warn on nil bytes/rows

* add stage-type mapping

* typo

* split CI into separate jobs (#63746)

* Add python_runner.clj (#63747)

* Add python runner

* Kondo

* Traceback fix

* Remove dead code

* start the runner by default

* Cancellation not used yet

* Remove unused keys from fields-metadata

* cherry pick driver fixes

* start for postgres and mysql as well

* clickhouse fixes

* relax for snowflake

* typo

* exclude transform-python-test from appdb

* exclude transforms-python-test as well

* try exclude-tag here too

---------

Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>

* execute.clj (#63755)

* execute.clj

* with drivers test and execute test

* with wait tables

* missing utils

* /s/open/start

* fix failing tests due to getting the wrong source and target

* kondo

* move cancel-python-code-http-call to python-runner

* Dan's feedback

* we have 2 implementstation of cancel

* and 2 db-routing-enabled?

---------

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

* Transforms python APIs (#63762)

* transforms python api

* new tests pass locally

* clean up the db id utils

* move to util

* fix: missing refer

* chore: missing tests/kondo

* kondo

* more kondo

* fix: make function resilient

* eh, validate on old

* on new

* Add python transform support for jobs (#63764)

* Add python transforms job support

* Fix whitespace in when

* Avoid churn due to new local

* Add feature test

* Add ignore for logs (there might be away to avoid this)

* Use new target-database-id util

* Remove duplicated fn

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: Dan Stone <wotbrew@gmail.com>

* Move transform ordering tests to the python module (#63827)

* Add transform ordering tests to the python module

- Consistent with api tests for python transforms being in the python
module
- In practice transforms module 'knows' about python, so this is
organizational only
- Copied test helpers for now, not sure if functions strong enough to be
shared

* Check :transforms/python

* Proj python/table name len (#63842)

* feat: ensure temp-table-name respects max length

* add unit test

* add limit for missing drivers

* depend on it

* fix: use db instead of db-id

* Proj ptyhon/table swap (#63878)

* add rename feature, rename-table! multimethod

* add table swap with atomic or rename or fallback

* changelog

* drop requirement

* ensure we're testing replace flow

* wait for completion, table already exists

* wip

* add rename-table-test

* fix for snowflake

* fix: support bigints (#63898)

* fix: support bigints

* merge meta

* Frontend for Python Transforms (#63699)

* cherry pick driver code (#63628)

* cherry pick driver code

* update changelog

* add type->database-type unit tests

* kondo

* create/insert table

* insert-from-jsonl test

* missing rename-tables for snowflake

* extend rename-tables-test to more drivers

* line breaks

* add driver python transform feature

* handle review comments

* kondo

* feat: replace string->val with a more generic insert-col->val

* remove non transactional impls

* chore: docsstrings

* TODO

* extra test

* fix extra test

* test all base-types

* fix sqls

* setup ci properly (#63693)

* feat: add Python transform frontend pages

* Integerate with FE

* Fix wrong source field name used for showing script in transform view

* Revert "Fix wrong source field name used for showing script in transform view"

This reverts commit c7dfb541f3.

* Fix edit button not doing anything for python scripts

Closes QUE-2300

* call api proxy instead of internal call, also have settings page for transform

* python transforms now properly being scheduled

* FE select table when creating python transform

* multiple tables

* ensure tables are unique in tables selector

* source alignments

* run test

* dead code

* Better default schema, better docstring

* fixex test run

* add cancel button

* better endpoint name

* add cancel button to test python endpoint

* working button

* Auto-update Python transform function signature when table aliases change

- Automatically updates def transform(...) signature when aliases are modified
- Updates docstring Args section with aligned descriptions and table names
- Adds reset button to restore default slugified aliases
- Validates alias input to only allow valid Python identifiers
- Handles multi-line signatures for many parameters (>80 chars)
- Shows visual distinction between custom and auto-generated aliases
- Fixes code editor layout to prevent overlap with Run button

* feat: settings page with s3 configs

* feat: split settings

* remove placeholders

* eh, rename to appease the munging

* Logs are viewable inline during execution of python transforms

* Some minor fixes around docstring rewriting

* solve more fe lints

* fix type errors

* more type check fixes - including some smelly optional override stuff

* fix delete transform + table

* fix: don't remove indentation before """

* chore: allow empty schemas

* Critical fix: docstring indentation

* Separate file / s3 lifetimes / writes / reads from http calls (#63294)

- python-runner no longer simulates a single http api that does
everything (incl s3 interaction)
- Separates file lifetimes (shared storage) from execution
- Easier to see how to avoid reading into strings (e.g. for piping into
tmp files, follow up)

Earlier on we had a service that managed much of the I/O, metabase now
coordinates it so it makes little sense pretending there is still
an overall http api.
# Conflicts:
#	enterprise/backend/src/metabase_enterprise/transforms/api.clj
#	enterprise/backend/src/metabase_enterprise/transforms/execute.clj
#	enterprise/backend/src/metabase_enterprise/transforms/python_runner.clj
#	enterprise/backend/test/metabase_enterprise/transforms/python_runner_test.clj

* Add first-class PythonTransformSource type

# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/transforms/components/QueryEditor/EditorBody/EditorBody.tsx

* Lay python editor out in two columns

* Make python editor resizable

* Move parseCSV to utils

* Split off results into separate component

* Add empty and loading state components

* Split up ExecutionResult component

* Move python execution to separate hook

* Remove color in editor gutter

* Increase indentUnit for python

* Allow extension to be passed to CodeEditor

* Add pandas completions

* Use DataGrid for displaying results

* Python library APIs (#63378)

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
# Conflicts:
#	enterprise/backend/src/metabase_enterprise/api/routes.clj
#	enterprise/backend/src/metabase_enterprise/transforms/python_runner.clj
#	enterprise/backend/test/metabase_enterprise/transforms/python_runner_test.clj
#	enterprise/frontend/src/metabase-enterprise/api/tags.ts
#	resources/migrations/057_update_migrations.yaml

* transforms python module (#63503)

# Conflicts:
#	enterprise/backend/src/metabase_enterprise/transforms/api.clj
#	enterprise/backend/src/metabase_enterprise/transforms/execute.clj
#	enterprise/backend/src/metabase_enterprise/transforms/jobs.clj
#	enterprise/backend/src/metabase_enterprise/transforms/util.clj
#	enterprise/backend/src/metabase_enterprise/transforms_python/python_runner.clj
#	enterprise/backend/test/metabase_enterprise/transforms_python/api_test.clj
#	enterprise/backend/test/metabase_enterprise/transforms_python/e2e_test.clj
#	enterprise/backend/test/metabase_enterprise/transforms_python/python_runner_test.clj

* Use normal title case

* Handle json-line output

* Remove unused props

* Rename PythonEditor to PythonQueryEditor

* Move script rewriter to utils

* Flatten Python transform page

* Rename shared to common

* Remove dead code

* Reduce specialization in Transform editor

* Remove unused props

* Move PythonQueryEditor to top-level components

* Nest Python editor components in PythonTransformEditor

* Restructure Python transform editor

* Split up component more

* Add helpers for python editor

* Disable default schema

* Add test ids

* Fix import path

* Reuse transform save modal

* Fix parameter

* Add e2e tests for python common lib

* Move python transform api to general transforms folder

* Move type to metabase-api/types

* Disable debugger for python transforms for now, allow to open it with query param

* Disable debugger hotkey for python transforms

* Add syntax highlighting to Python script on Transform page

* Remove cancelation code for now

# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/transforms/components/RunButton/RunButton.tsx
#	enterprise/frontend/src/metabase-enterprise/transforms/pages/TransformPage/RunSection/RunSection.tsx

* Add more generic RunInfo

* Remove unused LogOutput

* Set up python runner in CI (#63566)

* Check out with submodules in CI

* Include python-runner in docker compose for tests

* Set up python runner in CI

* Fix import

* Update python-runner
# Conflicts:
#	python-runner

* Fix font sizes

* Fix table layout

* Revert "Remove unused LogOutput"

This reverts commit 90c0704344.

* Add LogOutput back to runsection

* Remove duplicate schema field

* Use css instead of styled components

* Fix LogOutput styling

* Add transforms/python feature

* Do not allow picking unsupported databases

* Use slugify from metabase/lib/formatting

* Add type for transform alias map

* Fix some type imports

* Refactor PythonDataPicker

# Conflicts:
#	enterprise/frontend/src/metabase-enterprise/transforms/components/PythonTransformEditor/PythonDataPicker/PythonDataPicker.tsx

* Further refactors

* Use data selector for database picker

* Use data picker to pick tables

* Remove unused var

* Improve tests for python transform

* Fix duplicate imports

* Use DatabaseId in python transform

* Remove source/draft ambiguity in types

* Move library types to metabase-types/api

* Remove api transforms

* Remove vibe-comment

* Remove unused component

* Validate source more

* Move TableInput to separate file

* Remove TableOption type

* Simplify props

* Move AliasInput to separate file

* Remove unused props

* Add border to empty results

* Fix import

* Remove extension

* Move draft back to new python transform page

* Fix new python transform page nesting

* Simpify new transform page structure

* Add analytics to history revision and data reference (#63587)

* Transform run cancellation (#62387)

* Add cancellation to transform api

* Use effect to set polling state

* Add cancellation button to run button

* Set up cancellation on transform page

* Use confirmation modal to cancel transform

* Add run cancel button to run list

* Make api endpoint take transform id instead of run id.

* Fix cancelation api

* Add canceled state to TransformRunStatus

* Add canceled state to transform page

* Add polling to RunListPage

* Remove comment in code

* Set status to canceling when you click cancel

* Add canceling status

* Poll when the transform is canceling

* Add copy for runs that are being canceled

* Manually track fetching status for running and canceling

* Handle canceling status in utils

* Avoid wrapping cancel button in run list

* Add test for canceling run on transform page

* Add e2e for canceling test from runs page

* Fix prop type

* Change copy to Canceling

* Add custom color to canceled state

* Remove mock code

* Increase cancelation tiemout

* Fix copy in text

* Fix snowplow event

* Remove void specifier and close modal in handler directyle

* Add optimistic update for run cancelation

* Avoid manually tracking cancelation status

* Avoid useEffect when changing isPolling

* Add in missing helper

* Remove another useEffect

* Add placeholder run when starting

---------

Co-authored-by: Eric Normand <ericwnormand@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>

* Fix command z not working in connection string input (#63689)

- Stop preventing default event handling onPaste.
- Improve Cypress paste emulation to be compatible with React way of handling paste events.

* Transforms prepare for python (#63698)

* pull out transform run utils to prepare for python transforms

* fix: check running-run on transform-id, not run-id

* chore: put on a new line

* Fix #63629: Filter on cards causes an unnecessary horizontal scroll bar for public/static embedding (#63650)

* Closes EMB-50 tabs dimmed out on iOS (#63690)

* S3 transport layer for python-runner (#63697)

* Add s3 dependencies (#63706)

* port prometheus/instrumentation (#63631)

* port prometheus metrics

* port instrumentation

* instrument existing transform paths

* wider buckets

* remove nil handling

* warn on nil bytes/rows

* add stage-type mapping

* typo

* Implement data picker according to designs

* Further adjust to design file

* Fix some e2e tests

* Clone python runner when running CI

* Avoid starting the container in e2e tests twice

* Hide python runner admin route when user does not have the feature for it

* Remove unused variables

* Move Python runner amdin page to transforms plugin

* Do not show Python library link when the user does not have python transforms support

* Hide Python transforms features when the user does not have transforms-python token

* Use useHasTokenFeature hook where possible

* Add transforms-python feature

* Fix e2e tests

* Do not include python-runner in test docker-compose yet

* Tag tests for python transforms with @transforms-python

* Add helper to update Python library

* Add check for python output

* Fix Revert on python library when it does not exist

* Fix e2e test helper

* Add python runner settings in CI

* WIP

* Translate pandas definitions

* Add AnsiLogs component

* Use AnsiLogs in Logs components

* Use AnsiLogs in LogOutput component

* Remove token feature gate in enterprise folder

* Return alias instead of throwing

* Check type in isPythonTransform assertion

* Use isResourceNotFoundError

* Make transforms-python it's own plugin

* /s/localhost/localstack

* Add test for editing Python transform

* Verify that running the transform with the library works

* Add missing transforms-python feature to mocks

* Simplify source layout

* Change setting type of python runner token

* Fix tests

* Use ConcreteTableIds in python transforms only

* Deduplicate codemirror helpers

* Ignore errors in non-parseable JSON lines

* Use useLocation hook to enable debugger

* Use useErrorMessage helper

* Move SourceSection to transforms-python plugin

* Fix codemirror helpers

* Remove undefined color

* Fix types

* Fix codemirror helpers more

* Move transform ordering tests to the python module (#63827)

* Add transform ordering tests to the python module

- Consistent with api tests for python transforms being in the python
module
- In practice transforms module 'knows' about python, so this is
organizational only
- Copied test helpers for now, not sure if functions strong enough to be
shared

* Check :transforms/python

* Proj python/table name len (#63842)

* feat: ensure temp-table-name respects max length

* add unit test

* add limit for missing drivers

* depend on it

* fix: use db instead of db-id

* Proj ptyhon/table swap (#63878)

* add rename feature, rename-table! multimethod

* add table swap with atomic or rename or fallback

* changelog

* drop requirement

* ensure we're testing replace flow

* wait for completion, table already exists

* wip

* add rename-table-test

* fix for snowflake

* Extract sourceDatabaseId helper

* Fix e2e helpers

* Fix error in table picker

* Add missing test-id

* Fix transform tests

* Validate python source

* Fix issues after merge

* Fix tag test

* Fix other tag test

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Nicolo-Maria <nicolo.mezzopera@metabase.com>
Co-authored-by: Dan Stone <wotbrew@gmail.com>
Co-authored-by: Chris Truter <chris@metabase.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Eric Normand <ericwnormand@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub.chodorowicz@metabase.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>

* Proj python fix tests (#63970)

* add premium feature

* fix tests that didn't run previously

* exclude from vertica

* remove internal id from mongo table-rows

* fix: require transforms/python db feature for python transforms

* missing in stats

* fix for mongo

* whitespaces to appease the linter

* more more whitespace for the linter gods

* disambiguate for the e2e tests

* Some small type fixes for Python transforms  (#64021)

* Remove duplicate helper

* Add updateEnterpriseSetting helper for type-correctness

* Add missing python runner settings

* Use correct setting name

---------

Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
Co-authored-by: Dan Stone <wotbrew@gmail.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Nicolo-Maria <nicolo.mezzopera@metabase.com>
Co-authored-by: Chris Truter <chris@metabase.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Eric Normand <ericwnormand@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub.chodorowicz@metabase.com>
Co-authored-by: Brad Anderson <brad@metabase.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-09-25 13:03:38 +00:00
Romeo Van Snick
eeecd9a10a Fix native preview button in transforms (#63865)
* Allow passing language as a plugin to CodeEditor

* Pull out NativeQueryPreview

* Render NativeQueryPreview in the native transform editor

* Relax prop types

* Add e2e test for query preview in transforms

* Fix e2e tests

* Pass query instead of question

* Use CopyButton instead of bespoke component

* Fix unit test
2025-09-25 20:42:46 +10:00
Roman Abdulmanov
685424df74 fixed colors (#64029) 2025-09-25 10:06:54 +00:00
Phoomparin Mano
c4af9c415b Double scrollbars are showing up on metabase-browser when always show scrollbar is set (#63971) 2025-09-25 16:07:56 +07:00
Mahatthana (Kelvin) Nomsawadi
ca66414190 Reset colors when passing undefined to theme (#63957)
* Reset colors when passing undefined to theme

* Add tests
2025-09-25 10:07:43 +01:00
Tyler Plude
855e846d0a Add result ID to search click event tracking (#64009)
* Add result ID to search click event tracking

* include entity_id in SearchEventSchema type
2025-09-24 22:13:03 -07:00
Alexander Polyankin
270086315f Add last run status info to jobs (#63994) 2025-09-24 20:51:02 -04:00
Alexander Polyankin
16ea0dc141 Rename DatePicker intervals to "past" and "future" (#63993) 2025-09-24 20:49:52 -04:00
Timothy S. Dean
94b9737f0b Handle trailing spaces appropriately in snippet template tags (#63582)
Attempting to use a snippet template-tag with a trailing space in the snippet name (e.g., `{{snippet: foobar }}`) caused an exception to be thrown when running the native query (missing required parameter).

The regex used for identifying snippet tags will now strip trailing spaces appropriately.
2025-09-24 23:05:27 +00:00
Nathan Voxland
4448933543 Add MB_WEBPACK_PORT env variable config (#63355) 2025-09-24 17:15:19 -05:00
Alex Yarosh
a9e0afd420 interactive embedding notes (#64007) 2025-09-24 17:18:31 -04:00
Cam Saul
d018b4a1bc Use Lib for query->source-card; fix busted tests and busted X-Ray code (#63921)
* Misc Lib improvements

* Restore deleted function... for now

* Test fix 🔧

* Mark more stuff in Legacy MBQL utils as deprecated

* Use Lib for query->source-card

* Update modules config

* Update tests 🔧

* Fix the X-Rays

* Druid test fix 🔧

* Appease Kondo
2025-09-24 13:47:57 -07:00
lbrdnk
92011484de Disable fks sync on CH (#63976)
* Disable fks sync

* Describe implementation with warning

* Kondo
2025-09-24 22:34:03 +02:00
Alex Yarosh
c10fd5cd5b docs: db routing with static embedding (#63999)
* docs: db routing with static embedding

Clarified limitations of database routing in Metabase.

* Update docs/permissions/database-routing.md

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-24 20:22:35 +00:00
Oleksandr Yakushev
564556d706 [perf] Suggest drop-in replacements for clojure.core functions from metabase.util.performance (#62971)
* [perf] Suggest drop-in replacements for clojure.core functions from metabase.util.performance

* Fix walk for nil

* [perf] Make metabase.util.performance/reduce compatible with non-iterables (like strings)
2025-09-24 20:08:22 +00:00
Riley Thompson
5e55ecd75c Add regression test for clickhouse jdbc driver (#63906)
* add regression test for clickhouse

* revert to 0.8.4

* fix

* fix tests
2025-09-24 13:50:03 -06:00
Ngoc Khuat
0a33f82baf Fix static viz ignore viz-settings order (#63980) 2025-09-24 19:28:38 +00:00
github-automation-metabase
7ecdc2f757 Update generated docs (master) (#63947)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-24 13:34:01 -04:00
Phoomparin Mano
0bf1ac867f Replace interactive embedding card in embed modal with embed flow (#63942) 2025-09-25 00:14:36 +07:00
Cam Saul
cbdc23a7bf Fix sorting on aggregate columns (#63940)
* Fix sorting on aggregate columns

* cljfmt
2025-09-24 10:55:23 -06:00
Edward Paget
c59e9de090 fix: check email in update before validing for sso (#63915)
Changes to any user attribute for sso users were failing preventing them
from being to set their user locale. This was due to us not checking if
`email` is present in the body of the update request before failing a
`check-403` call if the user has an sso source.
2025-09-24 11:10:58 -05:00
Uladzimir Havenchyk
9668ebe98c chore: upgrade typescript to 5.9 (#61494) 2025-09-24 18:45:28 +03:00
Sébastien
3c2d46151b Closes EMB-851 static embed pin map (#63897)
* Closes EMB-851 static embed pin map

* .

* .

* Update frontend/src/metabase/visualizations/lib/map.ts

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

* Update frontend/src/metabase/visualizations/lib/map.ts

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

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-09-24 17:42:40 +02:00
Alexander Polyankin
1cacd1f510 Constraint available relative directions in the DatePicker for transforms (#63893) 2025-09-24 11:36:39 -04:00
Ryan Laurie
a8074ca04b Thinner + Darker Borders (#63675)
* fix button borders

* update-border-color

* dont mix the colors

* update loki

* update again

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-09-24 15:31:25 +00:00
Oleksandr Solovyov
28014961c3 add index on report_card.type (#63493) 2025-09-24 15:19:51 +00:00
Tyler Plude
ec5b20af0c [METABOT] Fix bug in Metabot search deduplication (#63943)
* [METABOT] Fix bug in Metabot search deduplication

* rm debug defs
2025-09-24 08:01:06 -07:00
dpsutton
ab68e21cf7 revert nett-common and netty-buffer bumps (#63967)
rather than 4.2.4.Final, they will now be "io.netty/netty-buffer
4.1.118.Final" which puts it the same as that in 3.5.0.

The issue is that both the bigquery-cloud-sdk driver and athena driver
get put onto the classpath and it depends on which order the drivers are
added for resolving which version of this netty buffer dep you get.

```clojure
user=> (metabase.classloader.core/the-classloader)
user=> (enumeration-seq (.. (Thread/currentThread) getContextClassLoader (getResources "io/netty/buffer/ByteBufAllocator.class")))
(#object[java.net.URL 0x3bb34fe "jar:file:/private/tmp/fixed-athena/plugins/bigquery-cloud-sdk.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"]
 #object[java.net.URL 0x4ac1867d "jar:file:/private/tmp/fixed-athena/plugins/athena.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"])
```

One annoying bit to keep track of this is that bigquery uses a regular
jar that specifies its dependencies, so you can you regular tooling:

```
clj -X:deps tree :aliases '[:drivers]' > /tmp/deps.with.netty.downgrade
```

And then see those deps:

```
  . metabase/bigquery-cloud-sdk /Users/dan/projects/work/metabase/modules/drivers/bigquery-cloud-sdk
    . com.google.cloud/google-cloud-bigquery 2.54.2
      . com.google.cloud/google-cloud-core 2.60.0
      . ... [lots omitted]
    . org.apache.arrow/arrow-memory-netty 17.0.0
      X org.apache.arrow/arrow-memory-core 17.0.0 :older-version
      . org.apache.arrow/arrow-memory-netty-buffer-patch 17.0.0
        X org.apache.arrow/arrow-memory-core 17.0.0 :older-version
        . io.netty/netty-buffer 4.1.110.Final
```

This version was created without any pinning of netty. Checking the
athena version is a bit more tricky. We use a fat jar. But you can
download the source from amazon as a jar with deps:

```
athena-jdbc-3.5.0-lean-jar-and-separate-dependencies-jars
```

https://docs.aws.amazon.com/athena/latest/ug/jdbc-v3-driver-previous-versions.html

This zip includes `runtime-dependencies` which includes
`netty-buffer-4.1.jar`

The pom inside of this jar specifies

```xml
  <parent>
    <groupId>io.netty</groupId>
    <artifactId>netty-parent</artifactId>
    <version>4.1.118.Final</version>
  </parent>
```

And `META-INF/maven/io.netty/netty-buffer/pom.properties` specifies

```
artifactId=netty-buffer
groupId=io.netty
version=4.1.118.Final
```

So i am confident now that with the pinning in bigquery and this version
here that regardless of class resolution from
"jar:file:/private/tmp/fixed-athena/plugins/bigquery-cloud-sdk.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"
or
"jar:file:/private/tmp/fixed-athena/plugins/athena.metabase-driver.jar!/io/netty/buffer/ByteBufAllocator.class"
you will get the same class and athena shall work again.
2025-09-24 09:48:38 -05:00
dpsutton
821c0f624b ensure type/* for base-type if otherwise not known (#63930)
* ensure type/* for base-type if otherwise not known

Using the follow query that returns pg arrays:

```sql
SELECT *
FROM (
  VALUES
    (1, ARRAY['https://example.com', 'https://example.org']),
    (2, ARRAY['https://test.com']),
    (3, ARRAY['https://foo.com', 'https://bar.com', 'https://baz.com'])
) AS adhoc_table (id, urls);
```

In 55 this returned a nil base-type

```clojure
user=> (metabase.query-processor.metadata/legacy-result-metadata
         {:database 2
          :type :native,
          :native {:template-tags {},
                   :query "SELECT *\nFROM (\n  VALUES\n    (1, ARRAY['https://example.com', 'https://example.org']),\n    (2, ARRAY['https://test.com']),\n    (3, ARRAY['https://foo.com', 'https://bar.com', 'https://baz.com'])\n) AS adhoc_table (id, urls);"}}
         1)
[{:display_name "id",
  :source :native,
  :field_ref [:field "id" {:base-type :type/Integer}],
  :ident "native[]__id",
  :name "id",
  :database_type "int4",
  :base_type :type/Integer,
  :semantic_type :type/PK}
 {:display_name "urls",
  :source :native,
  :field_ref [:field "urls" {:base-type nil}],
  :ident "native[]__urls",
  :name "urls",
  :database_type "_text",
  :base_type nil}]
```

In master, this just fails. If you remove the type checking in places,
it will eventually return similar.

This base-type is computed in sql-jdbc/metadata

```clojure
(mu/defn query-result-metadata :- [:sequential driver-api/schema.metadata.column]
  "Default implementation of [[metabase.driver/query-result-metadata]] for JDBC-based drivers. Gets metadata without
  actually running a query."
  ([driver :- :keyword
    query  :- :map]
   (driver-api/with-qp-setup [query query]
     (let [database               (driver-api/database (driver-api/metadata-provider))
           {:keys [query params]} (driver-api/compile query)]
       (query-result-metadata driver database query params))))

  ([driver      :- :keyword
    database    :- driver-api/schema.metadata.database
    ^String sql :- :string
    params      :- [:maybe [:sequential :any]]]
   (sql-jdbc.execute/do-with-connection-with-options
    driver
    database
    nil
    (fn [^java.sql.Connection conn]
      (with-open [stmt (sql-jdbc.execute/prepared-statement driver conn sql params)]
        (let [rsmeta (.getMetaData stmt)]
          (mapv (fn [i]
                  (let [database-type (.getColumnTypeName rsmeta i)]
                    {:lib/type      :metadata/column
                     :name          (.getColumnLabel rsmeta i)
                     :database-type database-type
                     :base-type     (or (sql-jdbc.sync.interface/database-type->base-type driver (keyword database-type))
                                        :type/*)}))
                (range 1 (inc (.getColumnCount rsmeta))))))))))
```

Before this change, there was no `or` and
`sql-jdbc.sync.interface/database-type->base-type` would just return
nil.

```clojure
user=> (metabase.driver.sql-jdbc.sync/database-type->base-type :postgres (keyword "_text"))
nil
```

Unfortunately this is a multimethod so we can't easily update it in one
spot to fall back to type/*. Each implementation must take care to do
this. A few do (clickhouse does) but a few dont (snowflake does not). So
we update this call site to ensure we have something from the
multimethod or add our own type/*

Why did this start happening now?
> I think it's because I added :metadata/model-metadata to :metabase.lib.schema.info/info at some point

Query info stashes the model metadata which is
```clojure
[:metadata/model-metadata {:optional true} [:maybe [:sequential ::lib.schema.metadata/lib-or-legacy-column]]]
```

We had been throwing errors asynchronously when trying to save metadata,
but now we have on-thread type mismatch for model metadata, which is
what is in the ticket.

* add test to ensure we can handle existing base_type nil's

this got annoying because legacy metadata from the app-db comes from a
different location. I was adding a card schema migration but this is
better here.

The previous commit makes sure we don't put out more bad data, but this
commit here ensures that we can update the card.
2025-09-24 09:37:11 -05:00
Vamsi Peri
7423aaf572 Remove sessions from sync metadata registry (#63949)
Remove sessions table from sync metadata registry
2025-09-24 14:34:51 +00:00
Phoomparin Mano
03f68f0a2c Add embed flow to the command palette (#63944) 2025-09-24 21:22:55 +07:00
Romeo Van Snick
e8f125c19b Add error info to transform job page (#63623)
* Move cron info up into cron section

* Move schedule explanation logic to utils

* Allow ReactNode as explain message

* Render explain message in cron component

* Add status to transform job page

* Add e2e tests for job error message

* Add assertion to lookup

* Add extract shared logic for run status

* Add missing test-ids

* Select correct section
2025-09-25 00:20:23 +10:00
Romeo Van Snick
21c5271879 Fix failing transform tags test (#63964)
* Do not expect tag to be in popover when it's already selected

* Invalidate specific tags when deleting a tag

* Fix other tag test
2025-09-25 00:19:57 +10:00
Jeff Bruemmer
45d701fd6b docs - updates on documents, comments, and Metabot (#63922) 2025-09-24 14:06:31 +00:00
Uladzimir Havenchyk
7c1152e9d0 chore: fix type usage of parameters in sdk (#63918)
* chore: fix type usage for parameters in sdk

* make types plane
2025-09-24 16:21:54 +03:00
Kamil Mielnik
ab20852102 DSN-70 Custom maps section in Admin should have a nicer empty state for its table (#63874)
* Add empty state to custom maps component

* Add unit test
2025-09-24 11:04:24 +00:00
Phoomparin Mano
137bc61a42 Show toggle for enabling saves for question embeds in embed flow (#63908) 2025-09-24 16:35:02 +07:00
Kamil Mielnik
f567aeece1 Do not render tabs in ParameterSidebar if there's only 1 tab (#63815) 2025-09-24 16:21:16 +07:00
Mahatthana (Kelvin) Nomsawadi
e60e38682b Don't send new user login for SDK or Embedded Analytics JS (#63883)
* Don't send new user login for SDK or Embedded Analytics JS

* Update tests

* Stop using hard-coded string to detect modular embedding headers

* Conform to spacing rule
2025-09-24 08:59:23 +01:00
Timofey Kachalov
84efc79be4 refactor(sdk-bundle): Adjust SDK compatibility warning messages and banners (#63919) 2025-09-24 11:58:32 +04:00
Kamil Mielnik
8de8d13eb6 Update copy (#63823) 2025-09-24 14:55:11 +07:00
Kamil Mielnik
a52d58a3e2 Make info panel headings consistent (color, line-height, margin-bottom) (#63882) 2025-09-24 14:54:27 +07:00
Kamil Mielnik
f34cb3d5c3 Use Tab component in TagEditorSidebar (#63829) 2025-09-24 14:52:49 +07:00
Kamil Mielnik
d8571ccabe Update background color of Field items in TableSection (#63831) 2025-09-24 14:52:15 +07:00
Kamil Mielnik
19f279610b Remove forceActiveStyle prop from ActionButton (#63869) 2025-09-24 14:51:51 +07:00
Riley Thompson
5647233576 Fix starbust query cancellation with isClosed proxy implementations (#63857)
* add isClosed impls to proxys

* use mt/id in test

* test all drivers

* check if statements are supported, refactor statement-supported? multimethod to drive feature

* add namespace to statements feature
2025-09-24 05:10:13 +00:00
Riley Thompson
14481bcf2f Clean up transforms test schemas (#63406)
* clean up transforms test schemas

* use destroy-dataset! for bigquery
2025-09-24 05:08:55 +00:00
Mahatthana (Kelvin) Nomsawadi
bbccbb4842 fix(embed-js): Only report analytics when not in the preview (#63812)
* Only report analytics when not in the preview

This would avoid confusing preview usage with the actual usage

* Ensure analytics would be report even if iframe isn't ready

* Add E2E test

* Make the test pass

* Stop relying on redux store to fetch `site-url`

* Clarify test with comment

* Add tests

* Fix linter

I was naming a file wrong, so it doesn't match unit test spec. This rule
apparently doesn't take tests into account, which is great.
2025-09-24 06:06:45 +01:00
Cam Saul
4b99060f46 Do not recurse forever when resolving bad :field refs for expressions (#63926) 2025-09-23 17:57:27 -07:00
Cam Saul
3903af487f Misc Lib improvements to support wider Lib usage in the backend (#63911)
* Misc Lib improvements

* Restore deleted function... for now

* Test fix 🔧
2025-09-24 00:14:30 +00:00
Phoomparin Mano
0fb061b839 Minor visual improvements for embedding hub (#63813) 2025-09-24 06:14:51 +07:00
Tyler Plude
ab9e7bbcb8 [BOT-292] Metabot with Search 2.0 (#62067)
* Add search endpoint for Metabot and adjusted metadata

* More tests and better split out of logic into separate files

* dedupe search terms and description if they happen to be the same

* fix bad merge conflict

* Answer blending sql querying via search tables (#62415)

* Only put tables used in SQL into context
* Change format of injected database content by reusing existing models
* Create separate function for new schema enchancement
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>

* Add table reference for implicitly joinable fields in context injection (#62753)

* Update Metabot profile IDs (#62864)

* [Answer blending] Updates to the metabot admin configs (#62551)

* remove ability to configure the selected collection for default metabot

* add verified toggle

* add migrations for metabot collection configuration changes

* add metabot PUT endpoint, rip out metabot entities endpoints and usages, convert FE over to new FE, fix tests

* remove metabot_entity table, model, usage and refactor code to use updated metabot and metabot_prompts schemas

* enforce verification and regenerate prompts on verification + collection id change

* fix bad references

* fix bad regexp for fetch-mock collections by id endpoints breaking unit tests

* fix kondo

* fix + increase tests for enterprise/backend/test/metabase_enterprise/metabot_v3/tools/api_test.clj

* fix migration boolean default value syntax

* maybe fix be tests

* fix some tests

* enforce verified filter on the search endpoint

* factor in verified check into find-metric

* hide verification setting behind token feature check, fix migration lint, do not migrate collection id for default metabot, fix kondo errors

* fix core tests

* fix kondo

* fix most of the failing serialization tests

* fix migration lints

* fix one test file

* maybe fix migration failures

* move test resource file

* prevent default metabot from getting a collection id configured

* yolo

* add cascade delete to entity drop table migration

* increase unit tests for verification config UI

* remove extra add column

* fix migration... i think for real this time

* for real for real fix migrations

* no really

* tests fixes and add preventing verification toggle if the instance does not have the content_verification feature

* fix failing feature tests in ci

* fix one more

* fix cljfmt issue

---------

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

* [Metabot] Quick slash command + dynamic profile ui (#62909)

* quick slash command + dyanmic profile ui

* add back code i did not mean to remove

* fix failing test

* Revert "fix failing test"

This reverts commit b1c7e9efb9.

* [BOT-284] BE for notebook query tool table support (#62710)

* init

* moved query-table endpoint to query-datasource; add support for both model and table ids

* unit test fixes

* use existing card-query and table-query utils

* adding unit tests

* [Answer blending] Respect collection id in search (#63150)

* remove find metric tool

* adjustments to search endpoint

* add tests

* fix failing test in ci

* add way to override the metabot id

* add way to override metabot request id

* fix whitespace lint

* missing paren...

* fix failing test

* New BE `/search` endpoint for ai-service `SearchTool` (#63154)

* new metabot search tool BE endpoint

* remove debug prints

* parallel searches; incomplete effort to return more fields for results

* Simplify result transforming & response schemas

* unit tests

* kondo fixes; pr feedback

* fallback search model list

* remove references to MetabotEntity model which got re-added incorrectly in rebase

* Make internal metabot use verified content by default (#63529)

Update linter for usage of task in metabot-v3

Move suggested-prompts to separate namespace

Add collection condition only when current-user-id

Add startup task

migration

Update tests

Verified cards only

Test

Docstrings

Limit number of entities

Review feedback

* [METABOT] Default use_verified_content to false; tweak prompts (#63843)

* default use_verified_content false; limit amount of prompts

* reworked unit test to not depend on ai-service or appdb contents

* PR feedback

* remove mock of get metrics and models in favor of mt/with-empty-h2-app-db

* Small refactors & simplifications to metabot PUT endpoint and suggested
prompts job

* small simplification, use m/distinct-by for deduping tables

* rm deprecated search_data_sources

* Cleanup and prioritize verified content (#63877)

* Remove now redundant content verification guard

* Prioritize verified content

* Redundant merge

* Test

* ensure field IDs in user_is_viewing context are snake_cased

* Use proper source column alias as name for the model / table fields (#63826)

* Use proper source column alias as name for the model / table fields

* Add name as fallback

* test fix

* switch to using :lib/desired-column-alias, revert test fix

---------

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

* Fix some tests: consistent use of snake_case, and a :lib/source-column-alias fallback for model field :name

* fix more field_id snake_case issues

* fix another snake case issue - revert result_columns back to result-columns

---------

Co-authored-by: Thomas Schmidt <thomas.heinz.schmidt@gmail.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: Thomas Schmidt <thomas@metabase.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-09-23 14:42:29 -07:00
Alex Yarosh
a137631b7f docs: time grouping stages (#63934)
* docs: time grouping stages

* Update docs/dashboards/filters.md
2025-09-23 21:19:43 +00:00
Edward Paget
e4a04ebc05 fix: jetty stats handler tests flake (#63912)
* fix: jetty stats handler tests flake

These tests could hang indefinitely on the `(.join server)` statement
because the core.async/go block handling async requests was incorrectly
doing a blocking take `<!!`. This also updates our :dev alias to enable
core.async to print warnings when using blocking operations in `go` blocks.

* fixup! oncomplete dispatch in go block

* fixup! using alts!! in go block
2025-09-23 16:17:41 -05:00
Stas Gavrylov
432287f763 update comments email template (#63626)
* WRK-893: Update API to store comment html content

* WRK-891: Add HTML content sending in comments. Add proper SmartLink serialization to HTML.

* WRK-891: Update comment email template to display comment content

* WRK-891: Fixes for comment email template. Add space insertion after smartLink

* trigger comment notification by id

* put old api behavior back and cleanup comment notification context

* whitespace

* fix tests

* Fix changeset author

* WRK-891: Fix smart links serialization. Add parent comment display in email

* Add style payload for comments email template

* fix types

* 🙄

* test email changes

* test email again

* make email formatting looking perfect

* cleanup

* require html content to be provided when posting a comment

* fix e2e test

* fix another e2e test

* pass 0 as tiptap placeholder when no label available

---------

Co-authored-by: Oleksandr Solovyov <o@solovyov.net>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-09-23 21:16:18 +00:00
Oreon Lothamer
d8be52f651 use vertica-ce from ecr (#63609)
* use vertica-ce from ecr

* use CI_IAM_ROLE for vertica ECR

* Adjust test

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-09-23 11:09:32 -10:00
Nathan Voxland
6516199e3f Improve FieldValues inactive check (#63847) 2025-09-23 21:04:09 +00:00
Thomas Schmidt
1bba35237e Auto set template tags (#63691) 2025-09-23 19:19:34 +00:00
Alex Yarosh
4337a1baf3 docs: scim <> saml interaction (#63925) 2025-09-23 15:07:38 -04:00
Brad Anderson
23cb8b11c0 Fix: #50011 Hides "Here are some explorations of" when there are no explorations (#63839) 2025-09-23 14:07:33 -04:00
Cam Saul
c863f41c2a Improved mu/defn and mu/fn macros: only evaluate schemas once (#63737)
* Mega Malli fn improvements

* Remove commented out code
2025-09-23 10:44:03 -07:00
Jakub Chodorowicz
34e7a0e9f1 Adjust DB form page width and form fields spacing (#63818)
* Adjust DB form page width and form fields spacing

* Extract layout field settings to one file

* Use lg spacing between form fields

* Conditionally add labelProps property

* Fix typo

* Refactor deprecated default export

* Simplify responsive max width

* Simplify DB page responsive styles

* Add card background to add db form
2025-09-23 18:25:56 +02:00
dpsutton
454a05e3c6 Downgrade athena (#63894)
having issues with classpath. I _think_ that athena is finding the
bigquery provided version of a netty class and that is failing. but it's
a bit difficult to follow.

downgrading now until we can take time to understand and sort it.
2025-09-23 10:53:34 -05:00
Ryan Laurie
1ed050b03d Make Loki work more consistently (#63859)
* fix loki?

* update loki scripts

* use ci

* remove double build

* update scripts

* update documentation
2025-09-23 15:16:54 +00:00
Robert Kosara
9041dbb329 docs: Remove the +New option for creating new models (#63861)
* Remove the +New option for creating new models

* Bring back the from-scratch approach

Based on Alex's requested change, but also realized that you can use the command palette

* Move note about models getting pinned back into the new model section

* Format UI terms using bold instead of italics
2025-09-23 08:08:29 -07:00
lbrdnk
63cc5c3137 Semantic search token usage tracking (#63591)
* Pass type of embedding request

* Initial migration

* Add remaining opts args

* Add SemanticSearchTokenTracking module

* Connect token tracking to ai-service impl

* Add test for token tracking writes.

* Remove prompt_tokens including migration

* Add usage trimmer job

* Trimmer test

* Activate trimmer job

* test

* Record tokens for openai

* Update test

* Use total-tokens

* Comment

* linter

* Add index

* Exclude from copy
2025-09-23 16:50:55 +02:00
Phoomparin Mano
7551f766dd Hide non-customer-facing embedding hub settings (#63838) 2025-09-23 21:45:31 +07:00
John Swanson
f4b675b3f2 Serialize transforms (#63658)
Serialization for transforms
2025-09-23 07:34:17 -07:00
github-automation-metabase
123e0cef51 Update generated docs (master) (#63864)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-23 09:17:55 -04:00
Fraser
eed3bb1e19 Make timing steps continue-on-error (#63881) 2025-09-23 14:11:01 +02:00
Cam Saul
dad9b5c709 Don't spend minutes trying to generate descriptions for massive schemas (#63739)
* Don't spend minutes trying to generate descriptions for massive schemas

* Cljs test fix 🔧
2025-09-23 14:38:07 +03:00
Nicolò Pretto
166e20c944 fix typo in WhatsNewNotification: 'dimiss' -> 'dismiss' 2025-09-23 09:51:15 +00:00
Jakub Chodorowicz
e4d0318213 Migrate last direct usage of settings store url, to useStoreUrl (#63771) 2025-09-23 08:56:04 +02:00
Alexander Polyankin
3913c6e850 Fix pills input padding (#63840) 2025-09-23 02:03:55 +00:00
Fraser
f6384ac6f3 Automatically update e2e timings (#61950) 2025-09-23 10:19:09 +12:00
Maz Ameli
bd6d5e527b Replace usage of info_filled icon with info icon (#63734)
* replace usage of info_filled icon with info icon

* Update Loki Snapshots

* drop unused info_filled icon

* Update Loki Snapshots

* update stories

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2025-09-22 21:10:42 +00:00
Maz Ameli
4dac7d9dcf remove dropshadow from glossary container (#63730)
Co-authored-by: Stas Gavrylov <stas@metabase.com>
2025-09-22 21:04:20 +00:00
Nemanja Glumac
5bda80e53f Add simple event tracking for drill-thrus and other "click actions" (#63792) 2025-09-22 22:56:04 +02:00
Sébastien
07a34dc556 Removed loki flaky test (#63824) 2025-09-22 13:15:17 -07:00
Alex Yarosh
3a4e2a311c docs: send only attachements (#63846)
* docs: send only attachements

* Apply suggestions from code review

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-22 20:04:43 +00:00
Jeff Bruemmer
f0427f0a34 docs - add glossary and image (#63844) 2025-09-22 16:00:04 -04:00
Jeff Bruemmer
ebcdcf1ce9 Remove .json format from subscription options (#63849) 2025-09-22 15:59:09 -04:00
Nick Fitzpatrick
20afc08468 Hiros document desires (#63035)
* starting document copying

* Document copy from collection page

* remove card node
2025-09-22 16:53:00 -03:00
Alexander Polyankin
c60b139cf4 Fix removing all tags from a transform job (#63837) 2025-09-22 14:24:19 -04:00
Alexander Polyankin
cb7e5a0437 Transforms schedule component (#63767) 2025-09-22 18:04:33 +00:00
Anderson
1e4e4bcae5 Update user invitation email design (#63682)
* Update user invitation email design

* Add alt attr to img element

* Update system event clj test
2025-09-22 14:32:20 -03:00
Phoomparin Mano
f65c0fb194 Add completion checks for creating models in embedding hub (#63661)
* update test and implementation

* update models query to make more sense

* flake fix: try adding timeouts to Done

* remove cy.wait from tests

* wait for model creation

* modify create model tests
2025-09-22 16:33:12 +00:00
Nathan Voxland
fa187a027d Fix crash during reindexing of analytics on upgrade (#63770)
* Don't force reindex on serialization load to be async

* Allow reindex to be controlled when calling load

* Keep load reindex sync for now

* Make reindex async again
2025-09-22 10:30:57 -05:00
Alexander Polyankin
d25a14aec8 Show an error that variables in transforms are not supported (#63759) 2025-09-22 15:30:17 +00:00
Brad Anderson
4a59711053 Fix: #63258 + UXW-570 Fix truncated dashboard notifications (#63726)
* UXW-570 Fix truncated toast messages

* UXW-570 Updates e2e test

* #63258 Fix e2e tests (breaking because toast is wider, blocks previously unobscured elements)
2025-09-22 11:18:46 -04:00
Nemanja Glumac
c33489af35 Add tracking to bookmarks (#63752) 2025-09-22 15:12:24 +00:00
Alexander Polyankin
d6c7ef8e63 Fix MLv2 error with audit v1 (#63772) 2025-09-22 10:27:41 -04:00
Nemanja Glumac
6e7aeb6d71 Add tracking to the metadata changes from admin (#63672) 2025-09-22 16:20:52 +02:00
github-automation-metabase
6db1e7e2ad Update generated docs (master) (#63810)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-22 09:37:11 -04:00
Alexander Polyankin
f901d08b1c Hide cursor in the readonly native editor (#63774) 2025-09-22 13:26:06 +00:00
Alexander Polyankin
5bc7d211ba Remove unsupported buttons from native editor in transforms (#63768) 2025-09-22 09:20:43 -04:00
Alexander Polyankin
d04ffc2925 Change the default editor height for transforms (#63773) 2025-09-22 09:20:27 -04:00
Kamil Mielnik
c471c32f3f Allow to un-resolve deleted comments (#63429) 2025-09-22 10:06:21 +03:00
Romeo Van Snick
d867a09072 Convert MBQL transforms to SQL (#63565)
* Add a controlled version of NotebookNativePreview

* Use ReactNode instead of JSX.Element

* Add a button to toggle native sql

* Add sql preview to transform query editor

* Pull out resizehandle component

* Add e2e test for converting an MBQL transform to a native transform

* Move native query toggle out of header

* Move Native editor sidebar to separate component

* Fix overflow in native sidebar

* Fix copy on button

* Move connected NotebookNativePreview to query_builder

* Remove canConvertToNative prop

* Rename prop

* Move styles to css
2025-09-22 15:42:54 +10:00
github-actions[bot]
090fbc2d5a [chore] Update E2E test timings with recent data (#63327) 2025-09-22 14:27:07 +12:00
Fraser
33fe7b3afe Delete skipped expression popover e2e tests (#63732) 2025-09-22 12:08:46 +12:00
Phoomparin Mano
ea7eeeb15e Update related settings copy and alignment on embedding hub (#63660) 2025-09-20 09:46:30 +07:00
Phoomparin Mano
b693b137f6 Replace the language selection step on the setup flow with the language selector (#63584) 2025-09-20 08:55:34 +07:00
Phoomparin Mano
1a6044bbb3 Use blue shadow on embedding hub card to highlight next step (#63655) 2025-09-20 08:55:24 +07:00
Phoomparin Mano
e5706a4def Adjust the embedding homepage copy and add upsell for OSS (#63646) 2025-09-20 08:55:09 +07:00
Nicolò Maria Mezzopera
0014bbc775 fix(ci): properly account for ci-skip condition in jobs that specify IF condition (#63785) 2025-09-19 22:10:56 +00:00
Alex Yarosh
b96b8fbead docs: fix include in editable tables (#63783) 2025-09-19 17:55:54 -04:00
Phoomparin Mano
7e09b87447 Update embedding hub card copy for embed in your code step (#63656) 2025-09-20 04:46:49 +07:00
Brad Anderson
102025c69c UXW-753 Fix issues with Detail visualization columns getting out of sync (#63769) 2025-09-19 17:12:14 -04:00
Alex Yarosh
80b31c4b1e docs: progress bar (#63779)
* progress bar

* header

* Optimized 3 images, saved 190.8 KB (53.7% smaller)

* link

* Apply suggestions from code review

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

* feedback

* links again?..

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-19 16:59:49 -04:00
Alex Yarosh
d4adbb7ef0 docs: snippets (#63761)
* snippets

* Optimized 5 images, saved 209.2 KB (50.7% smaller)

* link

* sql -> native

* Apply suggestions from code review

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

* Update docs/questions/native-editor/snippets.md

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

* rawwwwww

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-19 16:50:12 -04:00
Jeff Bruemmer
04192e385d docs - model list view (#63727) 2025-09-19 20:48:25 +00:00
Uladzimir Havenchyk
18b9ae17c7 rework comments sidebar (#63636)
don't use Sidesheet and use sidebar on the same level as Metabot sidebar, so both sidebars can be opened side by side
2025-09-19 19:48:46 +00:00
Alexander Polyankin
b69218fe00 Transforms copy changes (#63760) 2025-09-19 15:03:48 -04:00
Alexander Polyankin
61a8141a44 Remove selected tags (#63714) 2025-09-19 18:40:19 +00:00
Cam Saul
2ed9e3e1d4 Delete dead FE code (#63740)
* Delete dead FE code

* Update enterprise/frontend/src/metabase-enterprise/audit_app/lib/cards/queries.js

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-09-19 10:18:13 -07:00
Abed Habli
a1a9e71867 docs: renaming Debian references (#63763)
* Renaming debian

* redirect to the doc
2025-09-19 17:52:17 +02:00
Edward Paget
0ed177ddb1 fix: remove commented out card pivot test (#63701) 2025-09-19 15:41:59 +00:00
Mahatthana (Kelvin) Nomsawadi
814dd5c800 Fix static embedding dashboard calling GET: /api/dashboard unnecessarily (#63753) 2025-09-19 21:32:19 +07:00
Oleksandr Solovyov
8285e38f9c cleanup v3/v2/ (#63634) 2025-09-19 17:25:58 +03:00
github-automation-metabase
8ad7ee944d Update generated docs (master) (#63736)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-19 09:07:22 -04:00
Phoomparin Mano
975002a6f7 Revert the cloud setup flow's layout to match self-hosted setup flow (#63577) 2025-09-19 18:34:03 +07:00
Phoomparin Mano
3fddbec54e feat(embed-js): better error message when useExistingUserSession fails (#63125) 2025-09-19 18:13:18 +07:00
Sébastien
c3461ab646 Closes EMB-816 misleading text for number of rows (#63561)
* Closes EMB-816 misleading text for number of rows

* updated e2e tests

* marked a test as flaky until we figure out what is up with it

* addressed legit comment

* Update Loki Snapshots

* loki

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-09-19 12:31:22 +02:00
Phoomparin Mano
b5878d9bf5 Show the embedding hub checklist in embedding homepage (#63596) 2025-09-19 16:47:51 +07:00
Oleksandr Solovyov
6206b6f204 document comments: enable user mentions (#63426) 2025-09-19 09:42:06 +03:00
Mahatthana (Kelvin) Nomsawadi
4ef96bd73a feat(embed-js): Add analytics to Embedded Analytics JS (#63580)
* Add Embedded Analytics JS usage snowplow schema

* Add analytics

* Clarify code with comments

* Fix analytics logic + fix typing

* Add unit tests

* Make E2E embedded analytics JS util supports multiple elements

* Fix code not working in Cypress for some reason

* Add E2E test suite

* Fix import order

* Remove extra line

* Fix E2E from util API change

* Update snowplow/iglu-client-embedded/schemas/com.metabase/embedded_analytics_js/jsonschema/1-0-0

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

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

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

* Update e2e/support/helpers/e2e-embedding-iframe-sdk-helpers.ts

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

* Fix E2E by updating a function API

* Pass snowplow schema lint

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-09-19 06:46:35 +01:00
Romeo Van Snick
b336da1517 Allow going back to snippet root collection (#63549)
* Allow going back to root collection from top-level snippet collection

* Add e2e test for snippet collections
2025-09-19 12:23:34 +10:00
Alexander Polyankin
c98dca560d Unskip transform tests (#63733) 2025-09-18 21:50:52 -04:00
github-actions[bot]
e370820778 Fix: Weird menu state shown when there are no questions in recents (#62985)
* Fix: Weird menu state shown when there are no questions in recents

Fixes #62728

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

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

* fix the robot's mess

---------

Co-authored-by: Claude Code[bot] <noreply@anthropic.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-09-18 23:06:45 +00:00
github-actions[bot]
69405a7dea Update translations 2025-09-16 (#63546)
* Update translation sources 2025-09-16

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-09-18 23:06:31 +00:00
Fraser
c0ca9e0493 Only run auto-backport when a backport label is added (#63606)
* Only run auto-backport when a backport label is added

* Assign backported PR to original PR creator
2025-09-18 16:57:42 -06:00
Fraser
ced8d84def Delete out of datte skipped caching test (#63680) 2025-09-19 10:39:24 +12:00
Fraser
8c8279e570 Delete unimplemented FKs in nested queries e2e test (#63684) 2025-09-19 10:39:00 +12:00
Fraser
6afe00b9f1 Fix custom column isNull e2e test (#63685) 2025-09-19 10:38:45 +12:00
Fraser
6e8cca3da7 Unskip join source table e2e tests (#63678) 2025-09-19 10:38:12 +12:00
Maz Ameli
a1582d07de Fix palette preview in Branding section (#63677)
* add tabs

* move reset button and remove needless tableheader

* fix palette preview chart

* change tab text

* cleanup

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-09-18 21:19:11 +00:00
Ryan Laurie
40387cc586 Update ActionButton to typescript (#63454)
* update ActionButton to typescript

* address review comments

* replace ref
2025-09-18 21:14:07 +00:00
Alexander Polyankin
911da7f851 Make transform list pages wider (#63710) 2025-09-18 20:49:56 +00:00
Jeff Bruemmer
4deefb87b3 docs - basic table editing (#63601) 2025-09-18 16:36:23 -04:00
Timofey Kachalov
c56432c2f7 Properly run tiles-query as admin user for static endpoints if JWT token is valid (#63692) 2025-09-19 00:11:33 +04:00
Timofey Kachalov
f9e9a20d94 fix(sdk): Properly load Tiles from MB instance (#63676) 2025-09-19 00:07:31 +04:00
Alex Yarosh
5d68e7363f docs: remove references to date coercion (#63716) 2025-09-18 15:58:58 -04:00
Stas Gavrylov
0efa8eac5b Data Reference – Glossary (#63576)
* feat: add glossary UI

* fix: line-height

* Styling

* Show edit button only on hover

* Make the term required

* Delete modal

* Actions menu

* Fix popovers opened for multiple terms

* Autofocus

* glossary api

* serialization

* support moving from h2 to cloud

* WRK-890: Replaces mocked glossary API with proper integration

* WRK-889: Refactor Glossary editing and overall styling

* WRK-889: Fix layout margin

* WRK-889: Update Glossary styling

* WRK-890: Address design comments. Refactor GlossaryTable into a separate component

* WRK-890: Add unit tests for GlossaryTable component

* WRK-890: Add e2e tests for Glossary

* WRK-890: Cleanup css, fix linter

* add boat empty state

* add explanatory text

* text and font weight tweaks

* tweak placeholder text

* improve delete confirm modal

* WRK-889: Update Glossary styling, implement hotkeys handling

* WRK-890: Add optimistic updates for Glossary editing

* WRK-890: Fix unit tests

* WRK-889: Adjust line height for glossary items

* WRK-889: More styling adjustments for GlossaryRowEditor

* WRK-890: Fix e2e tests

* fix merge results

* WRK-890: Address PR comments

* serialization fixes

---------

Co-authored-by: Konstantin Darutkin <spalt08@mail.ru>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Oleksandr Solovyov <o@solovyov.net>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
2025-09-18 22:38:56 +03:00
Oleksandr Yakushev
6e3dfdb62b Upgrade c3p0 to 0.11.2 (#63213) 2025-09-18 21:47:35 +03:00
lbrdnk
e915bf2d40 Add guards to semantic search jobs (#63694) 2025-09-18 18:57:14 +02:00
Cam Saul
118613ab89 Binning middleware needs to update :lib/original-binning as well (#63673)
* Binning middleware needs to update `:lib/original-binning` as well

* Test fixes 🔧

* cljfmt
2025-09-18 09:37:29 -07:00
Alexander Polyankin
4f764b82ef Do not autopivot transform query results (#63669) 2025-09-18 16:21:09 +00:00
Alexander Polyankin
ce5a554d4d Add transform count to the job list (#63647) 2025-09-18 16:16:51 +00:00
github-automation-metabase
eb5100abc6 Update generated docs (master) (#63679)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-18 11:44:29 -04:00
Sébastien
64630276e3 Closes EMB-50 tabs dimmed out on iOS (#63690) 2025-09-18 15:57:35 +02:00
Brad Anderson
6f660a3090 Fix #63629: Filter on cards causes an unnecessary horizontal scroll bar for public/static embedding (#63650) 2025-09-18 09:51:31 -04:00
Nicola Mometto
eab4bf076d Transforms prepare for python (#63698)
* pull out transform run utils to prepare for python transforms

* fix: check running-run on transform-id, not run-id

* chore: put on a new line
2025-09-18 13:46:24 +00:00
Jakub Chodorowicz
2be60d80c3 Fix command z not working in connection string input (#63689)
- Stop preventing default event handling onPaste.
- Improve Cypress paste emulation to be compatible with React way of handling paste events.
2025-09-18 15:20:03 +02:00
Romeo Van Snick
3038880e46 Transform run cancellation (#62387)
* Add cancellation to transform api

* Use effect to set polling state

* Add cancellation button to run button

* Set up cancellation on transform page

* Use confirmation modal to cancel transform

* Add run cancel button to run list

* Make api endpoint take transform id instead of run id.

* Fix cancelation api

* Add canceled state to TransformRunStatus

* Add canceled state to transform page

* Add polling to RunListPage

* Remove comment in code

* Set status to canceling when you click cancel

* Add canceling status

* Poll when the transform is canceling

* Add copy for runs that are being canceled

* Manually track fetching status for running and canceling

* Handle canceling status in utils

* Avoid wrapping cancel button in run list

* Add test for canceling run on transform page

* Add e2e for canceling test from runs page

* Fix prop type

* Change copy to Canceling

* Add custom color to canceled state

* Remove mock code

* Increase cancelation tiemout

* Fix copy in text

* Fix snowplow event

* Remove void specifier and close modal in handler directyle

* Add optimistic update for run cancelation

* Avoid manually tracking cancelation status

* Avoid useEffect when changing isPolling

* Add in missing helper

* Remove another useEffect

* Add placeholder run when starting

---------

Co-authored-by: Eric Normand <ericwnormand@gmail.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-09-18 10:34:50 +00:00
Nemanja Glumac
b2b04e9206 Add analytics to history revision and data reference (#63587) 2025-09-18 09:44:49 +00:00
Alexander Polyankin
ef8111537e Update copy in UpdateTargetModal.tsx (#63667) 2025-09-18 08:11:11 +00:00
Nemanja Glumac
7bce3ff38a Add analytics to Metabot events (#63415)
* Add Metabot events

* Fix tooltip label

* Add new event for metabot chat controlled from the native editor
2025-09-18 08:44:19 +02:00
Cam Saul
066d3a233d Pure Lib QP: remove code to wrap legacy middleware (#63645)
* cumulative-aggregations-middleware => Lib

* Ensure MBQL 5

* Fix NOCOMMIT

* Fix indentation

* Pure-Lib QP :party:

* Remove some more unused legacy MBQL utils
2025-09-18 00:13:20 +00:00
Fraser
095ad3c39c Tag latest flaky tests (#63617) 2025-09-18 11:54:13 +12:00
Fraser
d50561227f Fix skipped chart drill-through e2e tests (#63548) 2025-09-18 11:18:02 +12:00
Ryan Laurie
63f9d193a9 Use Iframe for changelog (#62943)
* use iframe for changelog

* add query params and tabs

* always show update info

it's useful even if you're on the latest version

* remove metabase as configurable host

* always allow changelog/releases in iframes

* fix tests

* fix tests

* update tests

* use root metabase domains

* fix test

---------

Co-authored-by: John Swanson <john.d.swanson@gmail.com>
2025-09-17 14:40:52 -06:00
Alexander Polyankin
0a18c13feb Skip failing tests (#63663) 2025-09-17 18:57:52 +00:00
Nemanja Glumac
a58c63a74f Add analytics to x-rays (#63498) 2025-09-17 19:55:51 +02:00
Alexander Polyankin
96f1ef42a2 Disable transform editing buttons when running (#63642) 2025-09-17 16:05:51 +00:00
Jakub Chodorowicz
fd073fb8b1 PRG-130 Send parse connection string parsing events only on blur (#63558)
* Send parse connection string parsing events only on blur

* Use synchronous last parsing result for monitoring

* Improve test assertions for connection string events

* Make sure we don' track the same parsing event again

* Refactor ts-match to simple if conditions

* Make lastStatus have the same success value depending on non undefined values

* Improve the snowplow Cypress test setup for connection string
2025-09-17 16:03:04 +00:00
Alexander Polyankin
a7971b43b1 Fix table layout issues in transform pages (#63540) 2025-09-17 11:49:22 -04:00
Cam Saul
0d1b4e253a cumulative-aggregations-middleware => Lib (#63592)
* cumulative-aggregations-middleware => Lib

* Ensure MBQL 5

* Fix NOCOMMIT
2025-09-17 15:47:13 +00:00
Sébastien
9986021635 Closes EMB-303 search bar in embedding no longer awfully long (#63632) 2025-09-17 17:09:28 +02:00
Anderson
ae422678b2 [Admin settings] Show help documentation to connect DB in a side panel (#63420)
* [Admin settings] Show help documentation to connect DB in a side panel

* Add unit tests

* Add more tests / tweaks

* Add e2e tests

* Make sure help content is not rendered if not available

* Self-review tweaks

* Use useDocsUrl in DatabaseHelpSidePanel.tsx

* Use aside element for the side panel

* Use await findBy when possible

* Use JSDoc / Remove unnecessary comment

* Add some style to blockquote

* Add test file for useHelpLink

* Fix failing test

* Add analytics event
2025-09-17 11:59:05 -03:00
Cam Saul
8ecc5c6718 add-rows-truncated middleware => Lib (#63616) 2025-09-17 14:52:21 +00:00
Cam Saul
dec95aabe7 resolve-joins middleware => Lib, remove add-source-metadata (#63608) 2025-09-17 14:50:07 +00:00
Ngoc Khuat
98e29f6c39 [Transform python] python lib apis and settings (#63568) 2025-09-17 14:23:11 +00:00
lbrdnk
b110c02981 Fix empty db url for metric collector job (#63633) 2025-09-17 14:15:20 +00:00
github-automation-metabase
a5056280e8 Update generated docs (master) (#63611)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-17 10:10:53 -04:00
Alexander Polyankin
33f5b24a0a Fix flaky "Change target" behavior for transforms (#63526) 2025-09-17 09:15:43 -04:00
Uladzimir Havenchyk
323e6f3823 chore: drop unused files (#63500) 2025-09-17 13:29:30 +03:00
Timofey Kachalov
b5b9bad486 Add the better handling of the missing enterprise token for Sample Apps e2e (#63573) 2025-09-17 11:51:20 +04:00
Thomas Schmidt
7f4cb813c2 Adjust legacy sql generation button to toggle Metabot chat (#63554)
* Adjust legacy sql generation button to toggle Metabot chat

* Change placeholder text
2025-09-17 07:01:08 +00:00
Oleksandr Solovyov
068f460124 [metabot] tool_calls should be a vector (#63579)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-09-17 09:09:28 +03:00
Oleksandr Solovyov
50e10ee9c2 enable metabot stats and prevent recursive token checks (#63574) 2025-09-17 09:09:06 +03:00
Cam Saul
4d54129a72 viz-settings middleware => Lib (#63597) 2025-09-16 22:32:46 -07:00
Cam Saul
3d2789c2f1 Fix #63571 (#63595) 2025-09-16 20:31:19 -07:00
Ryan Laurie
2e4c39904e Handle when tags are not defined (#63588)
Co-authored-by: Fraser <fraser@metabase.com>
2025-09-17 00:29:57 +00:00
Alexander Polyankin
0911bbe3b3 Simplify state management and fix the flicker with the transform run button (#63586)r
* Fix optimistic updates with transforms

* Fix optimistic updates with transforms
2025-09-16 18:49:37 -04:00
Luis Paolini
e08969edd9 Document password handling for special characters (#63590)
* Document password handling for special characters

* Add section on special character passwords in MariaDB

Added information about handling passwords with special characters in MariaDB connection strings.

* Apply suggestions from code review

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

* Update docs/databases/connections/mysql.md

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-09-16 19:22:14 -03:00
Aleksandr Lesnenko
b5942d4f36 respect decimals setting when compact formatting is enabled (#63457) 2025-09-16 17:54:07 -04:00
Alex Yarosh
914d56b2c0 docs: transforms draft (#63594)
* skeleton

* transforms

* privileges

* Apply suggestions from code review

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

* edits

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-16 21:53:21 +00:00
Anton Kulyk
035be556eb Improve the look and feel of charts in dashboards (#62610)
* Fix vertical legend position for cartesian charts

* Set dashcard title font size to 14px

* Decrease legend dot size

* Decrease value labels density for cartesian charts

* Use normal font weight for axis names, labels, etc

* Make y axis split lines solid vs dashed

* Show scalar card title in dashcard header

* Always show pie chart total

* Hide axis names on small dashcards

* Update screenshots

* Fix tests

* Fix number cards font size

* Fix hiding cartesian chart axis

* Fix font styles in other legend components

* Fix e2e tests

* Hide cartesian chart axes independently

* Use different legend style only in dashboards

* Apply min spacing to labels per series

* Fix legend dot size in edit mode

* Update label sizes for funnels and sankey charts

* Use bold font for data labels

* Update screenshots

* prettier

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-09-16 21:09:38 +00:00
Cam Saul
1919a6cd62 Trivial middleware, qp.compile, qp.execute => Lib (#63419)
* Trivial preprocessing middleware => Lib

* Handle already-native MBQL 5 queries

* substitute-persisted-query => Lib

* A bunch of post-processing middleware is actually MBQL-5 ready

* Fixx 🔧

* Test fixes 🔧

* More fixes 🔧

* Fix more stuff

* Wow even more test fixes =(

* (Hopefully) final round of test fixes

* Kondo

* More test fixes 🔧

* Fixes 🔧
2025-09-16 22:08:09 +03:00
Jeff Bruemmer
1a16244f86 docs - note on images (#63583) 2025-09-16 13:54:25 -04:00
Alexander Polyankin
ea5b0d4a9e Make description input in transforms bigger (#63541) 2025-09-16 15:13:57 +00:00
Ryan Laurie
b84b11532e skip broken about e2e test (#63572) 2025-09-16 08:07:07 -06:00
Oleksandr Solovyov
5e3968f517 report date for metabot usage info to HM (#63560)
* report date for metabot usage info to HM

* disable metabot stats to resurrect stats
2025-09-16 16:45:11 +03:00
Jeff Bruemmer
1b2ebb4fd7 docs - clarify webhook permissions (#63567)
* update webhook docs

* summary

* more perms
2025-09-16 09:30:17 -04:00
github-automation-metabase
d888aa8ee1 Update generated docs (master) (#63542)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-16 09:01:00 -04:00
Ngoc Khuat
7aa3f7fed1 Send pulse skip legacy alerts (#63497) 2025-09-16 11:44:43 +00:00
Phoomparin Mano
be673c4771 Unskip and fix flaky locale test for embedded analytics js (#63518) 2025-09-16 18:05:54 +07:00
Fraser
41db01c5e2 Unskip About page e2e test (#63538) 2025-09-16 22:19:55 +12:00
Oleksandr Solovyov
b0299c474d fix metabot token count query (#63556) 2025-09-16 13:04:04 +03:00
Ngoc Khuat
3275cb9a44 Driver table CRUD to skip QP (#63427) 2025-09-16 09:10:17 +00:00
lbrdnk
e7b70ba03f :metabase-search/semantic-fallback-results-usage (#63442) 2025-09-16 11:00:09 +02:00
Jakub Chodorowicz
25adbcfee8 Adjust label spacing in the db form (#63499)
# Conflicts:
#	frontend/src/metabase/databases/components/DatabaseEngineField/DatabaseEngineSelect.tsx
2025-09-16 10:24:52 +02:00
Timofey Kachalov
94b90013cb refactor(sdk): Replase Zod with Yup for SDK bundle schema validation (#63489) 2025-09-16 10:34:39 +04:00
Oleksandr Solovyov
065d6ce5aa Store Metabot conversation history with token usage and report it to HM (#63073) 2025-09-16 09:02:01 +03:00
Romeo Van Snick
2ce5dc4e46 Native editor sidebar for transforms (#63287)
* Swap cancel and save button

* Render sidebar in native query editor for transforms

* use toggleSnippetSidebar from props

* Fix snippets sidebar

* Export SelectionRange

* Add aria label for data reference button

* Open database on mount

* Add aria-label to snippets button

* Add e2e tests for sidebar in SQL transforms

* Rename prop for clarity

* Return instead of throwing

* Use Lib.rawNativeQuery

* Pass selected text to native editor

* Fix types

* Move longer handlers to hooks in utils

* Handle empty text and reshuffle code
2025-09-16 15:36:49 +10:00
Aleksandr Lesnenko
5b450f29aa support value and goal column selection in progress visualization (#62963)
* progress bar: support value and goal column selection

* design feedback

* fix spacing

* BE review

* FE review

* spec
2025-09-16 04:16:13 +00:00
Nathan Voxland
dbc6913076 Reindex has to be async on language change callback (#63531) 2025-09-16 03:27:35 +00:00
Cam Saul
c1a3971ae8 add-implicit-clauses middleware => Lib (#63360)
* add-implicit-clauses middleware => Lib

* Test fixes 🔧

* Some lib.convert fixes from #61398

* Test fixes 🔧

* More test fixes

* Test fixes 🔧

* Handful of test fixes 🔧

* Discourage use of legacy MBQL utils in QP

* Integrate the platinum metadata provider

* Only one failing test left

* Test fix 🔧

* Kondo

* Test fixes 🔧

* Test fix 🔧

* Test fixes 🔧

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Handle legacy pivot viz settings where `base-type` might not be present

* Test fix 🔧

* Test fix 🔧

* Kondo

* Test fix

* Test fix 🔧

* Skip failing transforms tests

* Mark failing tests flaky
2025-09-15 19:35:54 -07:00
appleby
319fc114ab Update :bookmarked and :user_recency scorer to work with mysql and mariadb (#63205)
* Update :bookmark scorer to work with mysql and mariadb

* Update :user_recency scorer to work with mysql and mariadb
2025-09-15 18:43:22 -07:00
Alexander Polyankin
c456cb5a6f Disable failing transform tests (#63535) 2025-09-15 22:52:32 +00:00
Fraser
a743c86b25 Enable skipped implicit-join and breakout e2e tests (#63486) 2025-09-16 10:50:36 +12:00
Fraser
0348e0b3c3 Remove skipped pie chart label truncation e2e test (#63471) 2025-09-16 10:47:59 +12:00
Fraser
a32eeb88a2 Fix skipped time series binning e2e test (#63428) 2025-09-16 09:37:24 +12:00
Fraser
7ad5cdac94 Fix skipped notebook info popoever e2e tests (#63487) 2025-09-16 09:37:07 +12:00
Phoomparin Mano
0aa42f596f Integration branch for Embedding Hub (#62986)
* Setup sidebar and onboarding page for embedding hub (#62517)

* Add the add data and new dashboard modals to embedding hub (#62528)

* mark sandboxed step as done (#62758)

* Auto-mark 'secure your embeds' step as done when either JWT or SAML is configured (#62736)

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

* Add UTM tags to documentation links in the embedding hub (#62747)

* Add a wizard to select a table to x-ray in embedding hub (#62715)

* Mark the create embed steps in embedding hub as done from embed flow (#62759)

* Add a dropdown to switch embedding solutions in embedding hub (#62870)

* fix(embed-hub): adds key prop to component passed to jt (#63060)

* feat(embed-hub): checklist endpoint (#62875)

* feat(embed-hub): EMB-770 and EMB-742, add checklist endpoint with
'create-dashboard'

* feat(embed-hub): EMB-740 auto mark "Add data" as done

* Revert "mark sandboxed step as done (#62758)"

This reverts commit be775aceed.

* feat(embed-hub): EMB-768 move sandbox check to the BE

* EMB-772: move all "done" checks on the be, move endpoints to ee

* cleanup

fmt

configure enterprise module to make linting pass

test: activate license to make e2e tests pass again

remove fe unit test now that all the logic is on the be

add doc to the endpoint to maybe the tests will pass?

whitespace?

fixes

idk anymore how to make all the linters be happy

last try

refactor has-configured-sso to a function

revert  visibility to see if tests pass

sort config.edn

* tests: remove cy.wait from embed hub tests (#63066)

* Bit of cleanup

- remove warn-on-reflection; there is no interop
- clean up a bit of duplication in sql clause generation
- remove unncessary try/catch around t2 access
- remove a few boolean calls on boolean functions

---------

Co-authored-by: dan sutton <dan@dpsutton.com>

* fix(embed-js): disable the next button when embedded js is disabled (#63134)

* Replace the accordion in embedding hub with steppers (#63271)

* Move embedding settings into its own top-level menu (#63339)

* Add related setting cards to modular embedding and setup guide (#63340)

* Remove the Embed menu from the New menu (#63385)

* Completing later steps on embedding hub should not tick off the former steps (#63393)

* Modular embedding toggle label should depend on toggle states (#63391)

* Add the interactive embedding upsell to the settings page (#63399)

* Lock embed in production step in embedding hub checklist until sso configured (#63449)

* Use ee plugins to check if embedding is enabled in nav (#63446)

* Check for CSV uploads in embedding-hub checklist endpoint (#63501)

* update embedded-analytics-js.md to have consistent quickstart pages

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: dan sutton <dan@dpsutton.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-09-15 22:27:57 +01:00
Brad Anderson
dd68df30c9 Fix: UXW-683 Saving document resets undo history (#63462)
Fixes issue where undo history is deleted on save. Also fixes issue where CommentsSidesheet stays open (big unclosable grey box) when navigating to a different document when it was open.
2025-09-15 16:19:52 -04:00
Jeff Bruemmer
af495f2ff3 elaborate on privacy (#63524) 2025-09-15 14:46:39 -04:00
Alexander Polyankin
c343eaa0a3 Fix flaky transform tests (#63523) 2025-09-15 14:36:33 -04:00
Ngoc Khuat
29c013a78a Add rename-tables! driver method (#63302) 2025-09-15 16:36:13 +00:00
Alexander Polyankin
a85675ef2a Fix some transform flaky tests (#63517) 2025-09-15 12:00:00 -04:00
Alexander Polyankin
8c1582e601 Fix metrics stats in anonymous tracking (#63507) 2025-09-15 15:28:29 +00:00
Jakub Chodorowicz
a7eacc1c96 PRG-138 fix mongo and sql server YAML setup (#63496)
* Move sqlserver description to extra info tooltip

* Fix mongo additional-options not appearing in advanced-options section

# Conflicts:
#	e2e/test/scenarios/admin/databases.cy.spec.js
2025-09-15 17:21:10 +02:00
Jakub Chodorowicz
6ab20070a4 PRG-137 add engine icons (#63491)
* Add new DB engine icons, add icon to regular add DB flow

* Refactor old export style

* update h2 icon

* Fix layout of browse databases cards

* Adjust padding of browse databases cards

* Remove empty comment

* Render default db icon in case of empty engine key
2025-09-15 17:18:18 +02:00
Alexander Polyankin
7bc2093651 Ignore new flaky transform tests until they are fixed (#63516) 2025-09-15 08:34:04 -06:00
Alexander Polyankin
fa9d4ad2a4 Make RTK queries populate metadata created by the getMetadata selector without using the entity framework (#63262) 2025-09-15 10:19:48 -04:00
metamben
ea74e4e1dc Fall back to DESCRIBE if Athena JDBC reports duplicate column names (#63452)
* Fall back to DESCRIBE if Athena JDBC reports duplicate column names

* Make test fail another way

* Fix test

* Verify that the hijacked function gets called
2025-09-15 10:51:27 -03:00
Fraser
1920cc924c Delete old skipped test (#63372) 2025-09-15 21:49:49 +12:00
Sébastien
df7ba12468 Closes EMB-791 custom pivot column title not being translated (#63436) 2025-09-15 10:23:13 +02:00
Romeo Van Snick
35f9175eb0 Hide empty breakout step in readonly notebook (#63367) 2025-09-15 14:28:50 +10:00
Fraser
eeab38518a Remove skipped Metabase Cloud e2e tests (#63417) 2025-09-15 10:57:54 +12:00
Fraser
bc7d55b0dd Remove field filter popover cutoff e2e test (#63418) 2025-09-15 10:57:25 +12:00
Alexander Polyankin
c5b5970b77 Handle legacy viz settings where base-type might not be present (#63468) 2025-09-13 02:14:00 +00:00
Nathan Voxland
c8982e0d1d Fixed lint error (#63460) 2025-09-12 21:42:48 +00:00
Aleksandr Lesnenko
3477b876a2 fix trend chart month cut off (#63453) 2025-09-12 21:08:21 +00:00
Alexander Polyankin
63a60230f1 Migrate the Revision entity to RTK query (#63440) 2025-09-12 17:08:12 -04:00
Jeff Bruemmer
b9838f7cf7 docs - embedding chat (#63259) 2025-09-12 16:32:36 -04:00
Nathan Voxland
c024186f79 Search Indexing Improvements (#63099) 2025-09-12 15:01:39 -05:00
Cam Saul
acbff0c969 ℳℯ𝓉𝒶𝒹𝒶𝓉𝒶 𝒫𝓇ℴ𝓋𝒾𝒹ℯ𝓇 𝒫𝓁𝒶𝓉𝒾𝓃𝓊𝓂 ℰ𝒹𝒾𝓉𝒾ℴ𝓃 (#63368)
* Metadata Provider Platinum Edition

* Revert some formatting changes

* Revert changes to QP tests

* Revert NOCOMMIT changes

* Fix missing ns alias

* Pull in missing changes from other branches

* Misc fixes and changes

* Fixes

* Fix bugs in JVM metadatas

* Fix composed provider not propagating inactive

* JS fixes 🔧

* Test fix 🔧

* Test fixes 🔧

* Test fixes 🔧

* Another JS test fix 🔧

* More FE fixes 🔧

* Don't be too strict

* Set database

* Fix merge conflict

* Fix kondo

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-09-12 18:46:03 +00:00
Jeff Bruemmer
75d56ef281 docs - rename file (#63451)
* rename file

* links
2025-09-12 18:20:26 +00:00
Jeff Bruemmer
d2b1aadf84 docs - docs (#63413) 2025-09-12 13:49:04 -04:00
Ryan Laurie
f07baad1f8 add environment var to disable embedding builds (#63441) 2025-09-12 10:40:59 -06:00
Cam Saul
eecf97f077 Sandboxing middleware => Lib (#63321)
* Sandboxing middleware => Lib

* Test fix 🔧

* Remove some unused stuff

* rename `row-level-restricitions` middleware => `sandboxing`

* Remove TODO

* :model/GroupTableAccessPolicy => :model/Sandbox

* Test fixes 🔧

* Test fix and mark more stuff deprecated

* Test and Kondo fixes 🔧

* "Fix" sandboxes with extra columns because I don't want to update e2e tests

* cljfmt
2025-09-12 09:34:57 -07:00
Alex Yarosh
4768c58a01 docs - add modular embedding to securing embeds (#63444)
* docs - add modular embedding

Also adjust headers a bit because ToC is difficult to scan

* Update docs/embedding/securing-embeds.md

* Update docs/embedding/securing-embeds.md
2025-09-12 16:16:44 +00:00
github-automation-metabase
84530c5a58 Update generated docs (master) (#63421)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-12 12:16:07 -04:00
Ryan Laurie
0d1522742e Make question moving errors bubble correctly (#63409)
* make sure errors bubble correctly

* e2e tests

* fix test
2025-09-12 09:48:37 -06:00
Brad Anderson
2fcecd5de8 Fix: UXW-606 Bookmark drag and drop handle shown when there's nothing to rearrange (#63358)
* UXW-606 Hides bookmark drag handle when there's only one bookmark

* UXW-606 Adds unit tests
2025-09-12 10:25:58 -04:00
Riley Thompson
9164ad955e Disable transforms when db routing is enabled (#63402)
* disable transforms with routing

* disable selecting dbs with routing enabled
2025-09-12 09:32:35 -04:00
Sébastien
293120750e Closes EMB-792 dashcard title and description translation (#63432) 2025-09-12 14:26:59 +02:00
Anton Kulyk
b8b61d0647 Update "Customize Homepage" modal UI (#62280)
* Update "Customize Homepage" modal UI

* Update tests

* Reset selected dashboard on "Cancel" btn click

* Fix button name in test
2025-09-12 13:23:08 +01:00
Anton Kulyk
e4744ae67f Always use "public" schema for x-rays if it exists (#62285)
* Always use "public" schema for x-rays if it exists

* Handle null schema

* Fix type error
2025-09-12 13:13:00 +01:00
Nemanja Glumac
aa59dca84e Make "database" the first option in the "Add data" modal (#63412) 2025-09-12 10:52:22 +02:00
Cam Saul
5f5b2f6d07 Minor lib.convert fixes (#63401)
* Some lib.convert fixes from #61398

* Fix conversion of :dimension pseudo-clauses

* cljfmt
2025-09-11 20:12:13 -07:00
Cam Saul
40420f8d44 Test to confirm #63261 is fixed in master (#63414) 2025-09-12 03:11:34 +00:00
Cam Saul
34bddeb931 Normalize horribly broken fingerprints (#63407)
* Normalize horribly broken fingerprints

* Handle nil fingerprints
2025-09-12 03:02:09 +00:00
github-automation-metabase
16daec0315 Bump com.github.seancorfield/next.jdbc from 1.3.1048 to 1.3.1070 (#63220)
Inspect dependency changes here: https://github.com/seancorfield/next-jdbc/blob/v1.3.1070/CHANGELOG.md
2025-09-12 02:38:10 +00:00
github-automation-metabase
5caa919d59 Bump nrepl/nrepl from 1.3.1 to 1.4.0 (#63222)
Inspect dependency changes here: https://github.com/nrepl/nrepl/blob/v1.4.0/CHANGELOG.md
2025-09-12 02:22:22 +00:00
github-automation-metabase
69bda6feef Bump babashka/fs from 0.5.26 to 0.5.27 (#63216)
Inspect dependency changes here: https://github.com/babashka/fs/blob/v0.5.27/CHANGELOG.md
2025-09-12 02:18:39 +00:00
github-automation-metabase
cb1c25d58b Bump io.github.metabase/hawk from 1.0.11 to 1.0.12 (#63221)
Inspect dependency changes here:
2025-09-12 02:12:07 +00:00
Anderson
d998df052e [PRG-114] Show help & more specific error message when a database connection fails (#62956)
* Implement new DatabaseFormError component & break DatabaseForm component down

* Implement scrolling actions / Avoid 'div in p' console error

* Fix typing check issues / Add 'Read the docs' link url

* Define 'invite teammate' and 'contact support' urls

* add more tests / further refactoring

* css tweaks

* Simplify tests a bit

* Remove comment / Fix translation cases

* Refactor tests

* Adjust 'Check Host and Port settings' button / Fix css lint

* Fix test

* Add target=_blank to doc links / Use existing color for the error container border

* Use cloud-gateway-ips setting when showing IPs to whitelist / Move some helpers to a local utils.tsx

* Use 'be.visible' over 'exist' in cypress test

* Use useDisclosure

* Make Alert title have dark text color by default / Add storybook case to show warning color variant
2025-09-11 22:07:06 -03:00
Fraser
ce15cfeea9 Mark pagination test as flaky (#63328) 2025-09-12 10:54:50 +12:00
Ryan Laurie
a10afa8256 Deprecate old Alert (#63408) 2025-09-11 21:22:34 +00:00
Alex Yarosh
daca8d6c4e docs: translations are case-insensitive (#63383)
* docs: translations are case-insensitive

* Update docs/embedding/translations.md

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

* Add localization details for embedded Metabase

Added section on localizing embedded Metabase.

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-11 17:09:35 +00:00
Timothy S. Dean
80d6389e6e Handle mixed catalog table errors in Trino sync (#63356)
Trino's Hive plugin shows the tables in question in its metadata, but if you try to get a handle on these tables, it will always throw an exception with error code `UNSUPPORTED_TABLE_TYPE`. The Iceberg plugin has a similar exception for such circumstances.

For us, there doesn't seem to be much difference between not being able to query a table because it's an unsupported type and not being able to query because we don't have permissions, so`have-select-privilege?` is modified to return false in these cases. We can examine the vendor-specific error code on the SQLException to detect them.
2025-09-11 09:53:04 -06:00
Kamil Mielnik
7f723a20de Document Comments (#62800)
* Update Start new thread UI

* Refactor

* Lint migrations

* Lint migrations

* Lint

* Fix comments count

* Thread submit input improvements

* Align 'Start new thread' button

* mention metabase entities

* Stupid link copying

* Deep linking to comments

* fix: sidebar style improvements

* Fix line breaking bug on submit

* Maz Comments styling tweaks (#62964)

* add tabs hiding/showing logic

* only show persistent button for open comments

* move comment buttons to the right

* attempt to fix tests

* always display the add-a-comment input in the sidebar

* Remove unused attr

* Placeholders without flags

* Refactor comments' tabs markup

* Refactor CommentsMenu

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>

* Fix incorrect counter for unresolved comments

* Fix warning

* Fix key warning in Discussions

* Make document read-only when comments sidebar is open

* Refactor URL generation

* Automatically open correct tab for the comment targeted by URL hash

* Clean up

* Use createPortal instead of Portal from metabase/ui to fix CommentsMenu appearing above CommentsSidesheet when visiting a specific comment via URL

* Remove more/less feature

* Set max-height when editing comments, fix scrolling area

* Extra padding

* Make it possible to mention yourself

* Add ability to resolve deleted threads

* Remove ability to comment on resolved threads

* Remove ability to add new comments on Resolved tab

* allow using @ character without showing mention list

* Fix type errors

* Fix types

* Resolve/unresolve deleted comments

* Remove DocumentContext

* Fix inserting mentions on Enter press

* Minor styling fixes for mentions

* Remove unused endpoint

* Clean up

* Remove unused component

* Remove stories

* Fix storybook

* Remove TODO

* Remove unused file

* Remove outdated comment

* Avoid cast

* Remove redundant code

* Deal with any

* Don't trim empty nodes

* Simplify Discussions component

* Align avatar, submit button and code editor

* Do not show last divider if not necessary

* Get rid of currentIndex

* Fix typo

* Remove hack

* Check only unresolved comments when deciding whether to autofocus comment editor when sidebar opens

* Enable inline_code styling in comments

* Rename css file

* Fix cast

* Use top instead of transform

* Use a flag

* Remove commented-out code

* Move getCommentsUrl to utils

* Use Menu

* Add Avatar to metabase/ui

* Bring back accidentally removed code

* Resolve CSS duplication

* Use void

* Add comment

* Add all comments sidebar

* Use createSelector

* Fix no results styling

* Autofocus editor when editing comments

* Disable menu when editing is disabled

* Add a toast when copying the link

* Prevent deleting and editing someone else's comments

* Fix types

* Update copy

* Cleanup all comments sidebar

* Extract isMetabotBlock

* Use CustomStarterKit

* Copy

* feat: add Emoji picker (#62991)

* feat: add Emoji picker

* fix: styles

* fix: class for loading label

* Add ability to inline emojis in CommentEditor

* fix: keyboard events for emoji picker

* fix: focus visible for emoji picker viewport

* Implement proper keyboard support for inline emojis

* Temporarily hide emoji reaction button

* Improve UX around selecting first emoji

---------

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

* Pass editable

* Use mentions plugin

* Fix z-index

* Add reactions BE

* Improve list paddings

* Add users support to SmartLink and MentionExtension

* Remove old mentions

* use semantic colors for Avatar

similar logic to what do for users in admin

* show add comment input when we switch from resolved tab

* Limit number of user results

* feat: add comment reactions (#63072)

* feat: add comment reactions

* fix: typescript

* fix: click to react

* fix: styling

* tweak spacing between replies (#63100)

* fix: reply styles

* Update submit shortcut to Cmd-Enter. Fix emoji picking behavior

* fix: do not close discussion sidesheet on some escape events

* fix: cancel editing on escape press

* Make DocumentPage 400px narrower when comments modal is opened

* Extract shared tiptap-related code

* Move EmojiPicker to common/components

* Fix DiscussionComment error when creator is null

* Fix missing formatting menu in CommentEditor

* Add tests boilerplate

* Allow many reactions on a comment

* Hydrate creator info on deleted comments

* Add first test and helpers

* Add tests for more types of nodes

* Add comment

* Improve test name

* Test highlighting

* Add test for splitting paragraphs

* fix: blur comment editor on submit

* Add schema upgrade test

* Add test for creating comments and threads

* Add tests for deleting comments

* Editing a comment

* Test for Esc

* fix: limit editable functionality and add comment styles (#63161)

* Fix test

* Update test

* Fix flaky test

* Fix tooltip

* fix: do not react on deleted comments

* fix: show resolved threads

* fix duplicate replies display

* Add mentions tests

* Make suggestions taller to accommodate users search results without a vertical scrollbar

* don't count deleted comments for the comment badge

* don't show threads if all comments deleted

* Add emoji tests

* fix: can react true by default

* Fix floating menu positioning in CommentEditor

* fix document / menu selected item styling

* Sort comment reactions by created_at ASC

* Make Esc close emoji popup

* first pass at comments api

* Fix reactions ascending order

* WIP

* fix linting

* model resolution

* update test setup to include _id, so equality check works correctly

* replace is_deleted with deleted_at to detect deleted comments

* fix types

* remove ?new=true from url after adding a new comment

* Fix tests

* Improve arrow navigation when emoji popup is opened. Allow selecting with Tab

* Add test

* Refactor

* Update test

* Fix emoji popup Esc handler removal

* Add formatting tests

* Rename test

* Add e2e API helpers to create and delete comments

* Update test name

* Refactor

* Fix types

* update is not deleted eh

* Add test for the comment button

* Add test

* Add a test

* Add test

* test: basic resolve/unresolve tests (#63243)

* test: add resolve other person thread test

* Add test for disabling document editing when comments are open

* Add test for unsaved document changes

* Add test for show all comments button and fix the issue

* Add tests for deleting/editing other people's comments

* Add e2e tests for comment links

* add e2e tests for all comments

* way better/less verbose permission checks

* test: cannot reply to resolved threads

* ESLint

* Update assertion

* Fix unresolved comments count

* e2e tests for comments reactions

* first iteration of notifications

* fix migration lint errors

* fix module tests

* Add label attribute for SmartLinks to simplify server-side notifications rendering

* add e2e test for removing ?new=true after creating a comment

* Fix

* fix clj syntax

* Remove commented-out code

* Use H.readClipboard()

* Refactor

* Update reaction icon

* Move util

* Lint

* Fix

* Lift conditional rendering, move Reaction component to a separate file

* Refactor

* Do not render invalid links

* Refactor

* Update new comment notification template

* add e2e test for top blocks

* fix: comment date to respect browser locale

* Update reactions icon

* Add 1st test for email subscriptions

* Update email template to match figma, remove the comment content

* Add document icon to email template

* Update test

* Remove protocol from the link

* Extract verifyEmail helper

* fix migrations because mysql is majorly unhappy about those rollbacks

* correct urls for comments, notifications on mentions

* Update assertion

* Insert both comment URL and document URL into the email template

* Fix url

* fix copy tests

* Add a setup for next test

* Implement assertions

* 2nd email variant

* Add another test

* Add an assertion

* add more tests for email template

* Ignore whitespace

* Error handling for mutations - toasts

* add more tests

* feedback: drop blue border from paragraph

* feedback: placeholder

* fix e2e test to pass

* Update setup

* Comments design polish (#63352)

* use new Send icon instead of up_arrow

* remove extra space below a Discussion

* restyle Discussions

* fix CommentEditor spacing

* restyle current user reaction

* only show No Comments message on the All Comments sheet

* add on-hover highlighting for All Comments section

* fix for fe-type-check

* fix test

* Cleanup

---------

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

* put user permissions check back and new api for mentions

* pagination

* Use new GET /api/ee/comment/mentions in frontend

* Use new GET /api/ee/comment/mentions in smart link node

* paid feature in tests

* seed notifications

* oh

* clj-kondo 🤦

* port numbers

* Try to fix flaky test

* attempt to fix flaky e2e

* disable returning users for mentions

* disable mention related tests

---------

Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>
Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Co-authored-by: Konstantin Darutkin <spalt08@mail.ru>
Co-authored-by: Maz Ameli <maz@metabase.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
Co-authored-by: Oleksandr Solovyov <o@solovyov.net>
2025-09-11 22:09:54 +07:00
Aleksandr Lesnenko
179d170826 fix question title layout (#63348)
* fix question title layout

* fix dashboards as well
2025-09-11 10:32:34 -04:00
Aleksandr Lesnenko
b263bd0bc0 fix missing tooltip max width (#63353)
* fix missing tooltip max width

* repro
2025-09-11 10:32:25 -04:00
Aleksandr Lesnenko
4e851e0e19 fix date picker month navigation timezone issue (#63366) 2025-09-11 10:32:15 -04:00
Braden Shepherdson
8ac41c91d2 [ClickHouse] Fix SQL for equality filters on UUID columns (#62922)
Fixes #62492.

A literal UUID was reaching the driver as
`[:value "uuid-string" {:base_type :type/UUID}]`
but this was not recognized as a UUID-valued field because `:value`
clauses have `:base_type` and not `:base-type` like `:field` clauses.

Therefore the `:sql` core driver was rewriting this clause to cast the
UUID field to a string and compare that against the literal string.
With that logic now correctly recognizing such a `:value` clause, the
UUID fields are compared directly. This is much better for indexing,
but also works with *nullable* UUID columns, where the
`CAST(my_uuid AS text)` would cause SQL compilation errors.
2025-09-11 13:59:39 +00:00
lbrdnk
7a122eefd4 Better test isolation for semantic search and related refactor (#63164)
* Make with-index! use new, clean, separate database per test

* Add with-test-db! setup modes

* Comment

* Adjust with-test-db! and related

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

* semantic.tu/db removal

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

* Drop semantic.tu/db  from tu

* Remove once-fixture

* Remove ensure-no-migration-table-fixture

* Comment

* Comment

* Cleanup

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

* Remove redundant test

* Remove remaining usage of with-index!

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

* Cleanup

* Comment

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

* Adjust with-index-contents!

* Fixture to avoid running app-db tests

* Fixture

* Require

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

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

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

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

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-11 13:55:21 +02:00
Sébastien
8ac41c5b91 Closes EMB-756 translations for static embedded visualizer cards (#63067)
* Closes EMB-756 translations for static embedded visualizer cards

* Closes EMB-757 content translated pie loses custom colors

* unit test

* types

* renaming

* better type guards
2025-09-11 12:49:30 +02:00
Oleksandr Solovyov
cffe9615c6 update athena driver to 3.6.0 (#63369) 2025-09-11 12:24:46 +03:00
Jakub Chodorowicz
4ba3309c4c update Metabot AI terms link (#63370) 2025-09-11 10:46:28 +02:00
lbrdnk
9c712173ce Fix test issues in semantic search module (#63319)
* Make dataset-query->dimensions more robust

* *disable-updates*

* Add macro impls for easier debugging

* Make dataset-query->dimensions more resilient

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

* Fix conditional syntax

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

* remove comments

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

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

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

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

* add unit tests

* fix mocks

---------

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

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

* 🤦‍♀️
2025-09-10 12:17:58 -06:00
Cam Saul
63d6945498 optimize-temporal-filters middleware => Lib (#63275)
* optimize-temporal-filters middleware => Lib

* Fix circular dependencies

* Test fix 🔧

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

* Oracle test fix 🔧

* cljs test fix 🔧
2025-09-10 08:15:53 -07:00
Konstantin Darutkin
e539ba98ce fix: do not display value in options when editing FKs (#63332) 2025-09-10 15:28:08 +03:00
Jeff Bruemmer
926b5ea393 update placeholder copy (#63311) 2025-09-09 23:42:08 +00:00
Maz Ameli
00aca4b873 add tooltip to clear-conversation action (#63309) 2025-09-09 16:15:12 -07:00
appleby
e4f11aba66 Ensure results are realized when falling back to in-place results in semantic search (#63254)
* Ensure results are realized when falling back to in-place results in semantic search

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

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

* Kondo

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

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

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

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

So we can create the same shape (i omit description and is_writable to
seemingly no deleterious effect).
2025-09-09 08:18:55 -05:00
Timofey Kachalov
a0243ff3a4 ci(sdk): Skip sdk-bundle test suite for backward-compat SDK tests (#63291) 2025-09-09 16:30:08 +04:00
Konstantin Darutkin
f2d1f9f93d fix: display error messages from BE in Editable Data settings (#63288) 2025-09-09 12:09:47 +00:00
Konstantin Darutkin
71f02e8684 fix: disable row edit button when rows are selected (#63290) 2025-09-09 10:26:15 +00:00
Timofey Kachalov
7a90868ef9 refactor(sdk): Adjust logic of handling release-notes/changelogs for Embedding SDK (#63081) 2025-09-09 12:24:29 +04:00
Timofey Kachalov
48971b48eb feat(sdk): Add "start new conversation" button for MetabotQuestion and adjust its visuals (#63211) 2025-09-09 11:11:21 +04:00
Cam Saul
169f3f79e3 reconcile-breakout-and-order-by-bucketing middleware => Lib (#63267)
* reconcile-breakout-and-order-by-bucketing => Lib

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

* Add repro for metabase#63176

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

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

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

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

I've taken the logic and just called it multiple times, once per schema.
2025-09-08 13:34:45 -05:00
github-automation-metabase
3eb696e22b Update generated docs (master) (#63229)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-08 13:35:50 -04:00
Alexander Polyankin
60da15bf27 Transform list cleanup (#63208) 2025-09-08 13:32:48 -04:00
Noah Moss
3b3e5f91d6 Fix semantic search repair test flake (#63195)
* Use unique doc IDs across semantic search repair tests to fix flakes

* clear gate table before test

* try switching out table name generation
2025-09-08 12:33:29 -04:00
Jeff Bruemmer
0fcff349d1 note on custom expressions (#63249) 2025-09-08 12:08:55 -04:00
Riley Thompson
f8a66a7470 remove use database from snowflake transforms (#63199) 2025-09-08 16:05:57 +00:00
Riley Thompson
4672ea6c34 handle dbrefs properly (#63244) 2025-09-08 10:05:18 -06:00
Konstantin Darutkin
73e4ba5bd8 test: refactor datetime table editing tests (#63239) 2025-09-08 18:47:54 +03:00
Chris Truter
f09dbce65d Protect against nil search_vector (#63172)
Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-09-08 11:51:38 +02:00
Stas Gavrylov
dabaa3007e WRK-874: List view preview improvements (#63159)
* WRK-874: Populate preview for List View customization with sample values

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

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

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

* Fix lint errors

* Add horizontal padding for List view

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

* Tweak padding to avoid jump

* Center 'on' in join condition

* Make gap consistent

* Tighten margins to avoid jump

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

* spec

---------

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

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

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

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

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

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

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

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

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

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

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

Inspect dependency changes here:

* typo

---------

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

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

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

* fix kondo

* add transforms/table featuer for supported drivers

* fix transforms for dbs with no schema

* rename transform datasets to prevent foreign key overlap

* Add clickhouse support

* fix clickhouse tests

* fix redshift tests

* fix bigquery failures

* kondo and filter tests by feature

* fix transform dataset for bigquery

* fix sqlserver transforms with joins

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

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

* use different metadata provider

* filter for left join feature in test

* improve sqlserver compile-transform

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

* clean up

* add sqlserver error test

* Squashed commit of the following:

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

    Add message when a new transform will be created

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

    Allow creating values in schema form select

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

    Allow selecting schemas always, not only when there are schemas

* create schemas

* fix redshift

* add snowflake

* add sqlserver

* add clickhouse

* add bigquery

* Add test

* add default impl

* fix redshift tests

* Move SchemaFormSelect to components folder

* Allow creating schemas in the target update modal

* Allow initial value in SchemaFormSelect

* Only render schema field when the database supports :schemas

* Do not render new schema item if value is empty

* Add unit tests for SchemaFormSelect

* Add e2e tests for schema creation

* check schema exists first

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

* update changelog

* parse query and add into for sqlserver

* add type hints for linter

* Address comments

* realize bigquery execute-raw-queries

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

* Add tooltip when schema is new

* Use hydrated table from transform

* Add e2e tests

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

* Do not add default to databaseId

* Add tests for existing schema with new table

* Fix e2e test

* address comments

* rename connection-details to conn-spec

* Compare against null not empty string

* use find first

* Await request to avoid flakiness in hover

---------

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

Closes QUE-2156

* Placate kondo

* Test with scheduled jobs and filtering by tags

* Fix next_run_start_time test

* Return run timestamps as timezone localized strings

* Handle Zulu

* Prepare job list table for next_run and transforms

* Add JobListParams type and use it in getJobListUrl

* Add new parameters to listTransformJobs handler

* Parse params and pass them down on job list page

* Add filters to job list page

* Add tooltipPosition prop to Icon

* Add TimezoneIndicator component

* Allow rendering React nodes in table headers

* Add timezone indicators to job list and transform list

* Add timezoneToUTCOffset helper

* Add timezone to cron explanation

* Format timestamps as ISO-8601 strings with timezone

* Add next run timestamp

* Hide transform count in list for now

* Add next_run to TransformJob

* Add timezone indicators to run list

* Avoid wrapping timestamps in run list

* Move shared widgets to transforms/components

* Allow passing available shortcuts to filter picker

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

* Add e2e test for filters

* Add UTC offset in tests

* Report run timestamps in UTC and expose system timezone

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

* Expose system-timezone to admins only

* Fix setting docstring

* Fix serdes baseline-comparison-test

* Make transform_job API return run timestamps in UTC

* Placate kondo

* Timezone

* Use system-timezone instead of report-timezone

* Add tests

* Fix test string

---------

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

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

Fixes: 1dd56e5f14
References: https://metaboat.slack.com/archives/C010ZSXQY87/p1757002462314229
2025-09-05 15:37:19 +02:00
Phoomparin Mano
ef5e78f979 feat(embed-js): append entity-types=model to embed flow code snippet if the instance has over 2 models (#63068) 2025-09-05 19:49:50 +07:00
Riley Thompson
f4d3359e33 Remove driver/set-use-database in favour of setting the DB in the jdbc spec (#63047) 2025-09-05 08:38:17 -04:00
Alexander Polyankin
9be149e22f Fix flaky e2e test (#63128)
* attempt to fix

* Try to fix a flaky test

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

* Pass cardId and dashboardId

* Pass cardId and dashboardId

* Fix flaky test

* E2E test

* E2E test
2025-09-05 06:35:47 -04:00
Timofey Kachalov
ab4e737c31 feat(sdk): Add disc/memory caching for hosted bundle on top of etag caching (#63014) 2025-09-05 14:32:34 +04:00
Phoomparin Mano
4a1ce5d04f Send CORS headers for localhost regardless of whether SDK is enabled or not (#61747) 2025-09-05 17:17:52 +07:00
Timofey Kachalov
34f1e6811f Add dev.md placeholder for embedding-sdk-bundle folder (#63160) 2025-09-05 14:05:25 +04:00
Ryan Laurie
805e5beb8b Add base color prohibition to stylelint (#63091)
* add base color rule to stylelint

* allow in colors file

* lint in CI

* better highlighting

* css fixes

* fix all improper color use

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

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

* Update Loki Snapshots

* fix color name

* Update Loki Snapshots

---------

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

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

* update spec

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

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

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-09-04 09:39:10 -07:00
Jeff Bruemmer
207cbffc05 notes (#63097) 2025-09-04 12:06:25 -04:00
github-automation-metabase
cd962a792e Update generated docs (master) (#63106)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-04 10:52:23 -04:00
metamben
55ab852f4b Add transform dependencies and job transforms endpoints (#62776)
* Add transform dependencies and job transforms endpoints

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

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

* Add description to TitleSection

* Add Dependencies section to transform page

* Add transform order to job page

* Invalidate transform jobs when adding tags to transforms

* Add empty state for job transforms

* Add e2e test for transform and job dependencies

* Fix type for job dependencies component

* transform ordering is well defined

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

* make new function private

* Use neg?

* Remove unused require

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

* extend docstring

* use ->

* update docstring again

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

---------

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

* Add currency picker

* Add currency picker

* Fix flaky test

* Fix flaky test

* E2E test

* E2E test

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

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

* small update

* new appearance setting

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

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

* Apply suggestion from @jeff-bruemmer

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

* Apply suggestion from @jeff-bruemmer

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

* update on the browser

---------

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

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

* Gate metrics test

* Fix handling of pg 57014 error state

* Remove redundant require

* Unrelated cleanup

* dlq metrics test

* Indexer loop metric test

* Indexer metric tests

* Fix poll time

* Metric collector and test

* test name

* whitespace

* Fixture

* Suggestions

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-09-04 13:05:26 +02:00
Timofey Kachalov
32f47019f0 Update SDK docs for Hosted Bundle (#63069) 2025-09-04 12:43:36 +04:00
appleby
2c02a11a51 Update pgvector to pg17 in semantic search docker-compose.yml and CI workflow (#62967)
* Update pgvector to pg17 in semantic search docker-compose.yml

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

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

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

* Remove any and unknown for typing parameter values

* Use ParameterValuesMap where possible

* Fix parameter-parsing

* Fix tests

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

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

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

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

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

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

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

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

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

* Change filters to start_time, end_time, run_method

* Use timestamp literals instead of strings in test

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

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

* Allow custom react elements in displayValue prop

* Add filters for start_time and end_time to run list page

* Allow filtering on multiple run methods

* Add run method filter widget

* Close time filter when changing value

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

* Allow multiple values for run_method filter

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

* Fix e2e test

* Rename the run_method parameter to run_methods

* Remove "local" timestamps

* Return transform run timestamps in the system timezone

* Stop expecting a last_run with a nil value

* Rename run_method to run_methods to match api

---------

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

* Use full page view for editing db connection

* Fix title on edit database page

* fix dataspec  cypress test

* fix missing formLocation prop

* fix add initial data cypress test

* Fix add db test not waiting for db connected

* Fix default schedule cypress test

* Remove unnecessary nullish coalescing and route

* Extract common logic to use-database-connection hook

* Adjust Add DB page width

* Adjust padding for smaller devices

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

* Fix up tests, bug fixes

* Explicitly disable reindex! and reset-tracking

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

* fix tests

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

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

* try again to fix with-index

* fix kondo

* ensure drop table table names get quoted

* switch to using gate table for the anti-join

* add missing assertion in test

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

* make sure index cleanup task is initialized

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

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

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

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-09-03 19:08:15 +00:00
bryan
8d6e60df0f stabilize composed regex schemas (#61805) 2025-09-03 19:02:40 +00:00
Ryan Laurie
fd168103b8 set default time in create event modal (#63046) 2025-09-03 18:58:54 +00:00
bryan
f2ddc223b6 block prs coming from master (#61681) 2025-09-03 14:57:53 -04:00
Alex Yarosh
f0de6a74b6 docs links (#63084) 2025-09-03 16:34:21 +00:00
Phoomparin Mano
cefa86ccea Apply the new upsell flow to interactive and embed js upsells (#63062) 2025-09-03 23:32:21 +07:00
Rodrigo López Dato
4d6426249a Suggest to upgrade drivers only for self-hosting (#63079) 2025-09-03 12:28:08 -04:00
Phoomparin Mano
2f34d06d53 feat(embed-js): throws when setting invalid metabaseConfig keys (#63064) 2025-09-03 23:01:01 +07:00
github-automation-metabase
245f9e5090 Update generated docs (master) (#63056)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-03 11:08:39 -04:00
Ryan Laurie
2b28d4e60f Stop pushing useless version info highlights (#62950)
* stop pushing useless version info

* fix dash
2025-09-03 09:06:43 -06:00
dpsutton
128759d892 Fix time-interval filters (#62892)
* Fix time-interval filters

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

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

Locally in dev, we get:

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

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

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

spec:

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

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

With fix:

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

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

Note the missing options in the second position

* test e2e dashboard filters

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

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

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

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

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

2. The logs are all on a single line.

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

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

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

It's _too_ expanded.

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

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

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

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

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

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

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

* quick checkin on CI stuff

* load file to ignore vars

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

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

;; only found 4 tests
;; no ignored vars

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

nil

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

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

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

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

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

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

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

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

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

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

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

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

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

* empty ci-test-config

this will be the file when this merges

* print config when it has vars that we are ignoring

* PR review feedback

typo in example json

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

* fix errors found
2025-09-03 15:36:27 +02:00
Kamil Mielnik
bf19cc9606 Fix flaky test (#63009) 2025-09-03 14:07:42 +07:00
Romeo Van Snick
b53b8411c4 Wrap long question or dashboard names (#62980)
* Add repro for metabase#52872

* Wrap long titles without spaces in saved questions

* Add repro for metabase#52872 for dashboards

* Fix width of dashboard with long name

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

* Fix unit test

* Add repro for metabase#62987

* Lower fuzzing iterations
2025-09-03 09:55:58 +10:00
bryan
f80fee03bd Make Usage Analytics work on mysql (#62357)
Co-authored-by: dan sutton <dan@dpsutton.com>
2025-09-02 22:19:59 +00:00
Jeff Bruemmer
2970fc027f check doc links on PRs (#63041) 2025-09-02 17:04:42 -04:00
Ryan Laurie
a8fe573099 Fix Select Visual Bugs (#62466)
* fix double scroll + padding on select dropdown

* remove overrides for root overflow

* override inline style

* I think this is good

* less bad
2025-09-02 21:00:44 +00:00
Denis Berezin
8bd9ea4b3f Fix multiple datasource viz settings in visualizer (#63004)
* Fix multiple datasource viz settings in visualizer

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

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

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

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

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

* Fix schema-filters-patterns split

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

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

* Align replication schema-filters with HM

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

* preview endpoint changed

* temp frontend modal

* After pairing with Raimon

* Fix lint and fmt errors

* pg replication modal  (#61913)

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

---------

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

* Run prettier and linter on DatabaseReplicationForm

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

* Workaround broken dirty bit

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

* fix enabling of the replication button

* UI updates

* UI updates

* removed package-lock file

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

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

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

* Loading for preview method

* Error handling

* Modal padding and title updates

* Remove info about future email from form

* Misc

* Misc

* DatabaseReplicationStatusInfoProps cleanup

* Misc

* Status modal content padding

* Modal properties

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

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

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

* Align text of replication modal more with Figma

* UI updates 1

* Replication stats spacing updates

* Misc

* Tables listing icons

* Alignment updates

* Layout updates for tables listing

* Misc

* Colours updates

* List updates

* Misc

* Misc text alignment

* Misc

* Scrollable tables list

* Fix tables listing

* Comma separated DB WIP

* Misc

* Fix margins

* Ui updates

* More on setting up and success layout

* Test for spinner

* More on spinner

* Colour update

* Box shadow for spinner

* Spinner size updated

* Spinner padding updated

* Spinner added to setting up step

* Misc

* Sizes updated

* Fix for unit tests

* Debounce for schema filters

* Schema filters onChange

* Remove loading in button is no schema filters

* Loader for preview

* Misc

* feat: check replication table ownership

Same as how HM does it.

* Moved laoder next to the submit button

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

* Remove setFieldValue hack

Was obsoleted by 9cdbeaec7a

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

* Fix linter: Change set IDs are not in order

* Build uberjar container also when pushing a PR branch

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

Fixes: 22507a963a

* Link to postgres docs

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

* Misc

* Modal layout

* Error modal UI updates

* Misc

* More on layout + alignment fixed

* More on error layout

* Fix for modal closing

* rfct: use pg conn preview

* revert owner sync

* rfct: use existing schema filter format

* lint: fix fe

* feat: also show tables that will be replicated

* test: update be tests

* rfct: minor renames for consistency

* fix: cannot replicate 0 tables

* style: fix

* fix: copy

* test: update body prop

* test: add form tests

* fix: progress indicator on bottom

* fix: card styles

* fix: error message when no tables to replicate

* fix: easy stuff from jakub's review

* fix: error state for preview too

* claude: fast FE unit tests

* rfct: use fetchMock in FE test

* fix: remove small error step text

* fix: mocal close should reset setup step

* fix: translate noSyncReason

* fix: catch invalid schema pattern as 400

* rfct: use plain fn for onSubmit

* rfct: raise inline fn

* rfct: use correct token-check alias

* rfct: remove unused preview fields

* rfct: raise free-quota fn

* fix: throw on tunnel or certs

* rfct: remove silly when

* rfct: testable preview-replication and errors map

* test: granular fe error tests

* test: fix BE tests

* test: preview-replication unit tests

* fix: test redef name

* rfct: style and db as dbname

---------

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

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

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

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

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

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

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

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

* Cleanup and added tests

* Make whitespace linter happy

* Fix silly oversight

* Set warn-on-reflection

* Fix issues

---------

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

* Update e2e test for List View
2025-09-02 18:23:07 +03:00
Phoomparin Mano
087a69eb78 fix(sdk): prevent double scrollbars in sdk dashboards (#62962) 2025-09-02 21:20:02 +07:00
Phoomparin Mano
ad621ed1f0 Embed JS should show "Try it out" before docs in admin panel (#62954) 2025-09-02 21:19:15 +07:00
Phoomparin Mano
f4821a0935 feat(sdk): use entity ids directly in collection picker and browser (#60562) 2025-09-02 21:18:18 +07:00
Konstantin Darutkin
54bee8a76b feat: render link to table metadata editing in the error message (#63018) 2025-09-02 14:05:51 +00:00
github-automation-metabase
49080efe82 Update generated docs (master) (#62978)
Co-authored-by: github-actions <github-actions@github.com>
2025-09-02 09:50:28 -04:00
dpsutton
5973b65a81 disable starburst (#62955) 2025-09-02 08:29:16 -05:00
Chris Truter
e0f8ed8415 Return explicit errors when trying to edit a table without a PK (#62893) 2025-09-02 15:51:31 +03:00
Sébastien
ca9ebb9972 Closes EMB-716 publicly shared maps in dashboards (#62990)
* Closes EMB-716 publicly shared maps in dashboards

* string | number -> DashboardId
2025-09-02 11:23:21 +02:00
Phoomparin Mano
dbdf070383 fix(sdk): drills and go to dashcard does not work in dashboard with entity ids (#62953) 2025-09-02 16:21:54 +07:00
Timofey Kachalov
85ab7c0184 refactor(sdk): Improve version-helpers and sdk bundle version injection (#63008) 2025-09-02 12:27:20 +04:00
Fraser
0c17daf51b Enable ts incremental builds (#62910) 2025-09-02 10:29:07 +12:00
Phoomparin Mano
88aaf24794 ci(sdk): version bump for Next.js for host apps e2e tests (#62994) 2025-09-01 22:46:57 +07:00
Nicolò Pretto
a99144ee23 fix: remove helpers from the types of cy (#62662) 2025-09-01 16:57:32 +02:00
Sébastien
022b84e40d Closes EMB-650 move download button to footer for title-less embed tables (#62917)
* Closes EMB-650 move download button to footer for title-less embed tables

* Also show download button in paginated tables

* screenshot

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

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

* .

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-09-01 16:18:35 +02:00
Nicolò Maria Mezzopera
21125870c0 chore: removed not needed cy.wait (#61412) 2025-09-01 14:18:22 +00:00
Jakub Chodorowicz
11f98faf74 Hide CSV panel with no meaningful uploadable dbs (#62854)
* Hide CSV panel with no meaningful uploadable dbs

* Hide add data when no meaningful actions can be performed

* Simplify conditional for shouldShowUploadPanel test

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

* Show CSV tab also when user can upload data

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

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

---------

Co-authored-by: Anderson <ands.alves.nunes@gmail.com>
2025-09-01 13:50:52 +02:00
Cam Saul
b3c3ce62ab Fix deselecting fields in joins with inactive implicitly joined remapped columns (#62846)
* Don't add inactive remaps

* Don't add inactive remaps

* cljfmt

* summer squash

* Fix equality

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

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

* Kondo

* Fix fix

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

* Remove comments

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

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

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

* Don't add inactive remaps

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

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

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

* fix kondo

* add transforms/table featuer for supported drivers

* fix transforms for dbs with no schema

* rename transform datasets to prevent foreign key overlap

* Add clickhouse support

* fix clickhouse tests

* fix redshift tests

* fix bigquery failures

* kondo and filter tests by feature

* fix transform dataset for bigquery

* fix sqlserver transforms with joins

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

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

* use different metadata provider

* filter for left join feature in test

* improve sqlserver compile-transform

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

* clean up

* add sqlserver error test

* parse query and add into for sqlserver

* add type hints for linter

* Address comments

---------

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

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

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

* Mostly working nicely

* Clean up other middleware + test fix

* Finish it up

* Code cleanup

* Kondo

* Fix test 🔧

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

* Test fixes; PR feedback

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

* code cleanup

* Oracle test fix 🔧

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

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

* Add list view toggle control to ViewFooter

* Remove processRemappedColumns, add layout

* Navigation

* Back button,breadcrumbs

* TODO

* Layout

* Layout

* Refactor

* Column detection logic

* Inline

* Fix

* Extract Breadcrumb

* Fix

* Entity name in nav

* Condition

* Fix

* Header

* Style

* Remove

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

* Body

* Add empty list viz

* Update VizStyleToggle to use list display type

* Sidebar

* Style

* Add simple list view

* Add virtualization for ListViz view. Optimize rendering

* Copy

* Hover style

* Add object detail modal opening on list item click

* Remove back button

* Overflows

* a11y

* Redundant css

* Fix

* Fix rendering

* Style links

* Cleanup

* FK pill

* Render images

* Prevent showing old images while new are loading

* Take currency_in_header into account

* Extract `ColumnHeader`

* Cleanup

* Fix spacing, colors

* Refactor relationships

* Update PK drill

* PK drill

* Fix

* Fix

* Improve layout of list items

* Center cells content

* Add sorting

* Fix virtualized behavior

* Fix copy if row name is not available

* Max height for values

* Update ViewStyleToggle rendering rule to fix incorrect list view icon

* Styling fixes

* Make whole list view scrollable

* Hide truncated data warning for list view

* Fix PK drilll

* Don't memo formatted rows

* Fix virtualization

* Use drills for sorting

* Fix virtualization flickering

* Fix drills

* Disable viz settings for list view

* List view visual enhancements (#62124)

* spaecing and font styling

* add entity_type icons to listitems

* display 4 columns instead of 5

* change icon for transaction tables

* add circle for boolean fields

* add badge style to category columns

* add colors to badges, incl Score cols

* Save list questions as tables

* Footer

* Padding and scrolling

* Styling

* Styling

* Remove icon

* Fix useObjectDetail call for ListView

* Fix list view columns alignment

* Move detail view breadcrumbs to AppBar

* Style breadcrumbs

* Fix scrolling

* Show icon if avatar is missing

* Fix react key warning

* Align breadcrumbs with detail view page

* Remove arrow navigation and footer

* Styling

* Error handling

* Styling

* Make Detail View breadcrumbs preserve card settings

* Make DetailView breadcrumbs return to previous ListView state

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

* add company currency and receipt icons

* add new icons to IconName and Icons obj

* Remove duplicate 'currency' icon declaration

---------

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

* Update icons for TransactionTable and CompanyTable

* Make titleColumn always present. Update categoryValue styling

* ListView: Extract rendering logic to ColumnValue component

* Add tooltips for large column values

* Make list item grid always have at list 1 column

* Refactor DatasetEditorInner to typescript

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

* List view customization styling fixes (#62546)

* fix font sizes and spacing

* styling on ReorderableTagsInput

* make the viewsidebar 400px

* Make ReorderableTagsInput dropdown behave like multi-select

* Fix saving. Remove ViewStyleToggle

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

* Remove TabHintToast completely

* Fix container highlight when dragging between inputs

* Fix column settings in ListViz. Fix eslint

* Remove legacy DetailView code

* PR Cleanup

* Fix settings in list item preview

* Fix sorting. Replace custom column items with ColumnItem

* Fix saving models with list display type

* Fix incorrect condition to save list view models as tables

* Fix incorrect columns param in ListViewColumnsSidebar

* Fix list entity icon hover

* Tests – Models List View (#62836)

* Add storybook for ReorderableTagsInput

* wip

* Unit tests for ReorderableTagsInput

* Fix models-metadata related e2e tests

* e2e tests for List View

* Fix eslint

* Unit tests fixes

---------

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

* more settings

* another setting

* more settings
2025-08-29 14:21:27 +00:00
github-automation-metabase
41b42da633 chore(sdk): Update published npm version to 0.57.0-alpha.1 (#62920) 2025-08-29 14:00:29 +00:00
Kamil Mielnik
9319fb8ca6 Do not lock scroll behind detail view sidesheet (#62857) 2025-08-29 07:47:48 +00:00
Jakub Chodorowicz
75e51b4368 Prg 118 backfill provider name field on be side (#62420)
* Populate provider_name field on startup health check

* Serve provider patterns from BE side

* cleanup tests and expand clojure host provider detection

* Fix provider detection test

* Fix regexes for supabase and timescale

* adjust module api exports to standards

* mark private function ins provider-detection namespace

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

* Don't hardcode postgres in health check provider detection

* Make providers api dynamic and ready to support more engines

* Sort lines providers and engines

* Move hostname field tests to a test folder

* memoize detected provider

* Fix for tests for private functions

* Fix import of DatabaseProviderName type

* Use update function for setting provider_name on health check

* Fix typo in test case

* Remove duplicate entry

* simplify detect-provider-from-database call

* Move postgres extra-info to postgres driver module

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

* match provider also using engine

* bit of cleanup

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

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

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

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

---------

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

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

* Handle max = 1 case

---------

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

* Add comment documenting the intentional order

* remove recursive snake case update

* apply fix to both streaming and non streaming

* adding kebab->snake helpers that ignore camelcase

* Fix kondo

---------

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

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

* kondo fixes

* fixing tests by adding metabot premium feature flag

* profile-id-whitelist env var

* metabot-id-whitelist env var

* Revert "metabot-id-whitelist env var"

This reverts commit e46ef63242.

* Revert "profile-id-whitelist env var"

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

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

* use hostname

* fix params

* add test and clarify hostname field

* update helper text

* Apply suggestion from @jeff-bruemmer

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

* update hostname field

* apply suggestion

* improve test

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-28 17:24:42 +00:00
Dan Stone
2c8296bf53 BOT-319 Sem search dead letter queue (DLQ) (#62070)
* Add dead letter queue for the semantic search indexer

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

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

* Add the jitter factor I mistakenly deleted

* Doc fixes

* Slightly better stall recovery log

* Kondo

* Index attempt_at on DLQ table

* Add some more logging

* Init includes DLQ creation

* Fix some rebase collisions

* Formatting

* Add some asserts to show dlq creation during init

* Name test fixed with hashing

* Inline table-name-prefix

* Bump index meta version

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

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

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

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

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

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

* Whitespace cleanup

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

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

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

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

* Simplify honeysql qualified col reference in add-entries!

* Fix comment typo: s/indexes/indexer/

* Add missing seq in try-batch!

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

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

---------

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

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

In javascript, most of the store url stuff is through

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

which is based on `getStoreUrl` which is

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

...

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

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

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

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

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

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

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

This manually constructs a url:

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

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

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

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

* .

* .
2025-08-28 17:27:23 +02:00
Ryan Laurie
a40beb072a Fix Admin Nested Navlink Behavior (#62771)
* fix navigating on folders

* fix types

* conditional path for whitelabeling
2025-08-28 14:21:51 +00:00
Jeff Bruemmer
720c8513c5 relative links (#62827) 2025-08-28 09:24:54 -04:00
Phoomparin Mano
8dc14759a1 Fix flaky test for metabase-browser custom element (#62633) 2025-08-28 19:58:17 +07:00
Nick Fitzpatrick
e6d4839ffc Only clear card defer if request was not already cancelled (#62833) 2025-08-28 09:33:28 -03:00
Uladzimir Havenchyk
33c3ef25dc ci: use openldap from legacy registry (#62859) 2025-08-28 11:23:51 +00:00
Sébastien
b7a16be235 Closes EMB-760 table columns translations (#62760)
* Closes EMB-760 table columns translations

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

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

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-08-28 13:05:07 +02:00
Romeo Van Snick
da1637a882 Allow opening dashboard filters using keyboard (#62716)
* Do not pass Sortable attributes when element is not sortable

* Render parameter value trigger as button

* Add repro for metabase#52674

* Use UnstyledButton

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

* Update Loki Snapshots

* Use UnstyledButton and Box

* Fix syntax error

---------

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

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

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

This reverts commit 6970110108.

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

This reverts commit 30bb713240.

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

This reverts commit 71df2022c1.

* Trigger Build

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

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

* fix: show user-friendly error messages from server

* fix: review fixes

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

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

* fix: update expand row icon (#62268)

* fix: update expand row icon

* fix: review fixes

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

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

* inform admin about insufficient user permissions (#62395)

* fix: tests

* feat: add boolean input type (#62333)

* fix: typecheck

* fix: error display

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

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

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

* feat: show unsaved leave confirmation for table editing modals

* fix: modal order

* fix: review issues

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

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

* fix: date editing test

* fix: disable date test due to flakyness

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

* fix: visual blocker for table data editing

* fix: tests

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

* refactor to use ActionIcon

* fix bolt test

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

* fix: table editing bugs (#62796)

* fix: table editing bugs

* fix: tests

---------

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

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

* enable multi db by default for tests

* multi db as default, set inclusion filters for tests

* update introspection tests

* enable routing

* set enable multi db true as default

* use redef for spec

* clean up

* add more generic test

* update tests

* remove unused code

* clean up

* handle encrypted migration

* fix test and migration id

* move created and updated at fields

* more tests

* mark tests parallel

* fix whitespace

* fix athena test
2025-08-27 14:59:40 +00:00
Filipe Silva
7866ca3e84 fix: ignore case when offering metabot purchase (#62808) 2025-08-27 15:22:43 +01:00
Nick Fitzpatrick
e77320ac9e Git 7934 legends are cut off on pie charts when in documents (#62772)
* render pie charts more like dashcards in documents

* updating ChoroplethMap for documents
2025-08-27 10:42:54 -03:00
Sloan Sparger
9ccb92ab46 [Metabot] Add capabilities to metabot context (#62464)
Expose Metabase instance capabilities in ai-service context for Metabot

---------

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

* loki test

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

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

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

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

* Fix whitespace / alignment

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

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

* Remove references to Debian

* Use H2 database in .env file by default

* Add journalctl command to follow logs

---------

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

* do what metabot do
2025-08-26 15:29:11 -03:00
Aleksandr Lesnenko
e5e2c767a0 fix overflowing text in tables (#62708)
* fix overflowing text in tables

* thanks cubic
2025-08-26 17:28:27 +00:00
appleby
84763ca40d Refactor appdb-based scorers in the semantic search backend (#62690)
* Refactor appdb-based scorers in the semantic search backend

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

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

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

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

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

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

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

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

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

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

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

Where c6a9 is master and 462 is the branch.

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

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

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

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

And we get:

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

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

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

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

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

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

And now we have a correct list of files changed in that PR, not just
files different between current master and current PR.
2025-08-26 11:09:05 -05:00
github-automation-metabase
6f461a78b5 chore(sdk): Update published npm version to 0.57.0-alpha.0 (#62749) 2025-08-26 15:16:41 +00:00
Noah Moss
873f5830d0 Migrate remaining clj-time usages to clojure.java-time (#62696)
* Convert revision usage

* convert pivot test + metabot usages

* convert more tests

* migrate final clj-time usage in logger.core

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

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

This reverts commit 393bc56aad.
2025-08-26 10:49:09 -04:00
Timofey Kachalov
e141921ac8 Use jq for getting the SDK release tag (#62748) 2025-08-26 18:38:00 +04:00
Timofey Kachalov
8442c3a3fd Prepare build scripts for determine-sdk-version job (#62740) 2025-08-26 17:42:01 +04:00
Alexander Polyankin
9ec5f14c6b Make linking top-level parameters with inline parameters in dashboard work (#62691) 2025-08-26 09:00:52 -04:00
Alexander Polyankin
affd550c24 Ignore unsaved parameters when executing dashboard card queries in edit mode (#62680) 2025-08-26 09:00:27 -04:00
Alexander Polyankin
454598b4c0 E2E repro for "Model is being expanded to data sources after edit/distribute" (#62671) 2025-08-26 09:00:16 -04:00
Timofey Kachalov
c2016c28c8 Fix sdk pre-release version calculation and test-unit glob (#62729) 2025-08-26 16:42:40 +04:00
Kamil Mielnik
7dd4936c57 Detail view (#62011)
* Boilerplate

* Remove processRemappedColumns, add layout

* Navigation

* Back button,breadcrumbs

* TODO

* Layout

* Layout

* Refactor

* Column detection logic

* Inline

* Fix

* Extract Breadcrumb

* Fix

* Entity name in nav

* Condition

* Fix

* Header

* Style

* Remove

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

* Body

* Sidebar

* Style

* Copy

* Hover style

* Remove back button

* Overflows

* a11y

* Redundant css

* Fix

* Fix rendering

* Style links

* Cleanup

* FK pill

* Render images

* Prevent showing old images while new are loading

* Take currency_in_header into account

* Cleanup

* Refactor relationships

* Update PK drill

* PK drill

* Fix

* Fix

* Fix copy if row name is not available

* Max height for values

* Fix PK drilll

* Fix drills

* Footer

* Padding and scrolling

* Styling

* Styling

* Remove icon

* Move detail view breadcrumbs to AppBar

* Style breadcrumbs

* Fix scrolling

* Show icon if avatar is missing

* Fix react key warning

* Align breadcrumbs with detail view page

* Remove arrow navigation and footer

* Styling

* Error handling

* Styling

* Support models

* ESLint

* Types

* Types

* Make FK drill take user to the new page

* Update model-indexes.cy.spec.js

* Only consider PKs from the raw underlying source table

* Fix URL

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

This reverts commit c408188fce.

* Revert filtering by source table

* Rename DetailView to DetailViewPage

* Add DetailViewSidesheet boilerplate

* Revert e2e changes

* Lift state

* Rename

* Bring back old drills

* Format code

* Use sidesheet

* Custom stylesheet component

* Styling

* Fix FKs

* Paddings

* Shadow

* Spacing

* Cleanup

* Prev/next buttons

* Add url buttons

* Implement url generation + update model page url

* Fix

* Highlight zoomed row

* Fix

* Memo

* Fix interactivity when object detail is open

* Remove autofocus

* Fix tooltip

* Consistent close button

* Aria

* Pixel-perfect

* Fix types

* Fix FK pill rendering

* Fix types

* Fix

* Fix

* Fix remapping

* Fix types

* Move test id

* Use proper cols

* Remove dead code

* Add testid

* Fix unit test

* Update unit test

* Lift qb redux state usage from TableInteractive to DatasetEditorInner

* Add ... button and separators

* Add object actions menu

* Move getObjectQuery

* Fetch row if missing, update tests

* Update tests

* Update tests

* Update tests

* Hide nav when not useful

* Update tests

* Update tests

* Fix Esc handling

* Arrange separators

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

* Fix viz settings not being applied

* Refactor

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

* Fix actions fetching

* Add test for Esc

* change view detials icon to sidebar_open (#62471)

* Use new icon everywhere

* Fix row highlighting in questions

* Toggleable object detail

* Remove todo

* Fix test

* Make table viz settings affect the detail view

* Fix types

* Move filterByPk

* Fix types

* Use MLv2 to generate query

* Refactor

* Refactor

* Add keyboard navigation

* Fix types

* Fix

* Fix

* Update copy

* Style links

* Make selectors safe

* Responsive detail page

* Re-use Urls.tableRowsQuery

* Use Divider

* Fix pills

* Use palette colors

* Detail view - Tests (#62576)

* Take sidebar presence into rwd calculations

* Add test

* Add a test for toggling

* Add assertions

* Add unit tests for Header

* Add comment

* Add test

* Add tests

* Add tests

* Remove comments

* Add tests

* Add tests and extract helpers

* Fix model breadcrumbs

* Clean up

* Rename tests

* Add 404 tests

* Sort

* Format code

* Add tests

* Add Relationship unit tests

* Clean up

* Handle errors

* Add tests

* Add tests

* Add tests for images

* Proper model breadcrumbs

* Fix ellipsis

* Add assertions

* Add assertions

---------

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

* make parameter widget have the dropdown

* update tests

* cleanup

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

* remove deprecation message from addFields

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

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

* Add readOnly prop to PopoverBackButton

* Add readOnly to FilterPickerHeader

* Add readOnly prop to FilterPickers

* Allow making filter body readOnly

* Pass readOnly to FilterPicker from FilterStep

* Add disabled prop to ClausePopover

* Disable step popovers when readOnly (except for filters)

* Do not disable pointer-events for notebook preview

* Disable popover when button is disabled

* Render readOnly expression popover in readOnly mode

* Make limit step readOnly when readOnly is set

* Add test for readonly notebook

* Disable tooltip on join picker when read-only

* Disable join picker popover when read-only

* Hide back button on date picker

* Simplify backbutton props

* Do not allow going back in readOnly ExpressionWidget

* Allow readOnly AggregationPicker

* Allow opening aggregation popover when it is an expression

* Render aggregation popover when it is a custom expression

* Fix types

* Remove renderPopoverWhenReadOnly flag

* Fix cursor logic on SortStep

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

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

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

== How to test ==

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

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

* UXW-503 Makes CardEmbed error state selectable, bordered

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

* UXW-503 Adds e2e test

* UXW-503 Removes useMemo per PR feedback

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

* add partial index on gated_at for just the tombstone rows

* fix up index creation syntax

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

* fix tests

* fix whitespace, adjust log/docstring

* kondo

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

* add tests

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

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

---------

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

* support mention extension

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

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

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

Clarified instructions on pinning SDK versions for Metabase Cloud instances.

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

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

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

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

* Add e2e test case

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

* Let the backend handle the invite_sent snowplow event

* Change approach to set source value

* Fix unit tests

* Add unwrap() to createUser dispatch

* Remove unused invite param from the /setup endpoint

* Remove unneeded frontend code

* Fix kondo issues
2025-08-25 12:26:11 -03:00
Sloan Sparger
694fbaa5a2 [Search] Increase search reporting (#62200)
* track search_engine

* track request id

* record request id on search_query event

* fix bug with search_click position not factoring in pagination

* report offset on search_query

* report on the entity model

* move changes into new schema file and update referenced schema

* add back view_more event

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

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

* report search term for internal purposes only

* pr feedback

* add test coverage for new search reporting attributes

* maybe fix e2e in ci

* fix failing e2e
2025-08-25 10:15:19 -05:00
Timofey Kachalov
be2773de2b Make SDK backward-compatibility tests required (#62561) 2025-08-25 18:56:57 +04:00
Timofey Kachalov
15f7d3d20e refactor(sdk): Split embedding-sdk-bundle directory into 3 directories (#62613) 2025-08-25 18:36:56 +04:00
Riley Thompson
b39d5925b0 Enable specifying a database for Athena (#62183) 2025-08-25 10:14:41 -04:00
Nick Fitzpatrick
8879b09200 Fix Back Button for document questions and drill thrus (#62519)
* generalize back button

* update document back button

* test adjustments

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

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

* Also translate job descriptions.

* Use fewer hits to the db on startup

* Use site locale

* kick ci

* Remove extraneous arg

* Remove extraneous strs

* Different translation model (on select)

* setup no longer needed from transforms

* Fix

* Test transform tag translation

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

* Update Loki Snapshots

---------

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

* Update Loki Snapshots

---------

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

* Update Loki Snapshots

* Update Loki Snapshots

* Revert "Update Loki Snapshots"

This reverts commit 0fc74e3e68.

* Revert "Update Loki Snapshots"

This reverts commit 438a00eaba.

* Update Loki Snapshots

---------

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

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

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

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

* make it the new default

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

* Apply suggestions from code review

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

* markdown

---------

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

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

* Only query the recent_views table for models it knows about

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

* Cleanup comments

* Improve prometheus metrics for user-recency and add tests

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

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

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

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

* fix whitespace

* fix whitespace

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

* UXW-506 Hides some UI from Download as PDF

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

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

* Fix mapping parameters gap

* Fix usage analytics edit permissions button

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

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

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

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

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

That output looks like:

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

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

* Remove Undo button from toast when undoing a tag

* Avoid wrapping in certain columns for transform lists

* Add test for tag removal invalidation

* Fix unit tests

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

* Fix the test from #60583

* Code cleanup

* I have fixed #39033

* Enable e2e test

* Add ref for #62383

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

* Test update 🔧

* Update the test again

* Test fix 🔧

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

* Preprocess returns MBQL 5

* Split off changes to limit middleware

* Fix Kondo warnings

* Revert changes from Limit PR

* Code cleanup

* Preprocess returns MBQL 5

* Kondo cleanup

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

* Update more tests to use mock metadata providers

* Use even less with-temp

* Remove with-temp in QP middleware viz settings tests

* Rework metrics-test to never use with-temp

* Remove more with-temps

* Update case-test to use mock metadata providers

* Even more with-temps

* Update even more tests

* Fix two more

* Nice

* Revert stricter schema for query-hash

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

* cljfmt

* Test fix 🔧

* Fix permissions

* Split off malli improvements into #62523

* PR cleanup

* PR feedback

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

* Test fixes 🔧

* Test fixes and formatting

* Fix flaky tests

* Add clj-kondo ignores everywhere

* Bug fix 🔧

* PR feedback

* Fix if expressions with default values

* More test fixes 🔧

* Code cleanup

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

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

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

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

* edit

* various fixes

* links

* reinstate note

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

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

* fix test

* chore: check for index-created? in test

* undo

* feat: include index-created-at

* feat: support lazy gating + stale index behavior

* fix tests

* fix

* fix test

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

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

* feat: randomize index name

* force new index

* shorter name

* suffix as part of qualify

* re-init test

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

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

* pick last index

* docstring

* add test

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

* remove index-created? opt

* ensure table always exists

* back out including id/index_created_at in index

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

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

* Oops

* Fix circular deps

* Test fixes 🔧

* Page => cljc

* Test fix 🔧

* Add tests; Kondo fix

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

* Fix up tests, add orphan table handling

* Fix up conflict resolution

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

fix types and opacity

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

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

* store provider name in the app db

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

* Allow setting null value to provider name field

* Fix db tests

fix test

fix test

* Add db submit integration test

fix type error

* Rename mock file name

* Simplify postgesql json form mock

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

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

* upgrade to 8.2.2

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

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

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

* fix unit test and fix utm tags on link

* update docs link

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

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

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

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

* address feedback

* swap static and sdk as per feedback in the pr

---------

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

* add e2e test

* fix tooltips

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

* dont require, and skip

* skip in stress test

* add todos

* comment out vertica

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

* Add e2e test

* Review fixes - deduplicate text truncation

* Add visual test

* Fix CI

* Fix label offset

* Update Loki Snapshots

* Fix issue with static viz

* Update Loki Snapshots

* Fix visual tests

---------

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

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

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

* debug

* fix PR creation

* whitespace

* trailing space

* update release

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

* Add BE logic

* Fix

* Review fixes

* Review fixes

* fixup! use linear time deduplication

---------

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

* improve summary

* check out branch prior to gen

* update master and release

* run at different time

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

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

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

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

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

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

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

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

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

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

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

* Add visual test

* Update Loki Snapshots

---------

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

* Introduce settings

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

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

* Allow rendering databases as disabled in DataSourceSelectors

* Allow rendering databases as disabled in NativeQueryEditor

* Add features for transforms/* to type

* Disable unsupported source tables in the native queyr transform builder

* Allow disabling databases in DataPicker

* Allow passing shouldDisableItem from Notebook to DataStep

* Disable unsupported databases in datapicker for transforms

* Remove type error in filter

* Pass shouldDisableItem to more pickers

* Add missing database to item

* Filter out unsupported questions too

* Remove database property again from DataPickerItem

* Fix item type

* Rename db_id to database_id

* Pass database_id in collection picker

* Disable unsupported tables, metrics and dashboards

* Hide recent items that have been disabled

* Padd shouldDisableItem to more sub-pickers

* Add database metadata to table

* Add shouldDisableItem to TablePickers

* Rename helper

* Simplify types

* Add hook to avoid using metadata

* Disable questions based on unsupported databases in question picker

* Allow disambiguating RecentItem from TableItem

* Disallow transforms on audit databases

* Add tests for unsupported databases

* Add unit tests for disabling items

* Disable dashboards in Question picker

* Use plain ORDERS_ID

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

* Pull out helper into separate definiton

* Add test about creating transforms from metrics

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

* Use Loader from metabase/ui

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

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

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

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

* PR feedback

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

* update script

* add release workflow

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

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

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

* Add e2e test

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

* Trim the connection URI at first step

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

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

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

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

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

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

,,,

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

and after:

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

* eastwood doesn't like new qualified method stuff

* Attempt to fix flaky tests

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

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

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

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

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

Sending a notification like

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

now results in:

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

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

For illustration, let's say I do this:

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

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

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

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

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

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

* Move log context ex-data to special key

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

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

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

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

* Track job runs

* Add event when new transform is created

* Track transform create menu interactions

* Add tests for snowplow events

* Pull out transform manual runs into analytics file

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

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

* Move parameters to correct location when converting joins

* Fix conversion of joins with filters

* Splice join parameters together

* QP params => Lib

* Fix Kondo warnings

* Simplify PR [ci skip]

* Beautiful QP middleware

* Beautiful QP middleware.

* Add notez

* Test fixes 🔧

* JVM metadata provider fix 🔧

* Kondo & cljfmt

* Test fixes 🔧

* kondo

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

* Fix the schema

* Revert unneeded changes

* Fix busted tests 🔧

* Fix two more busted tests.

* Fix even more broken tests

* Fix broken tests 🔧

* Improved normalization for :value clauses

* Test fix 🔧

* Test fix 🔧

* Fix resolution of field name refs in first stage

* Test fixes 🔧

* Another round of test fixes 🔧

* Fix :expression ref parameters

* Maybe fix flakes

* Test fixes 🔧

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

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

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

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

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

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

This permanently deletes a collection and anything contained inside it.

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

Now you have:

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

(because C was trashed directly).

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

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

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

* Don't get the parent for no reason

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

* update workflow

* edits

* format

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

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

* Tighten up test assertions in native-query-test

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

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

* backwards compatible

* changelog

* more explicit changelog

* stronger wording

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

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

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

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

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

* sort active-engines by default-engine first

* more logging around appdb init

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

* committing forgotten files

* e2e adjustments and fixes

* test adjustments

* remove shameful hardcoded font sizes

* fix font size on switches

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

---------

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

* Extract upsell styles to per component css modules

* Regression - bring back margins to cta in large upsellbigcard

* Add upsell components to loki visual tests

* Fix too big margin in upsell large variant

* Align storybook story with the real usage

* Update Loki Snapshots

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

---------

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

* Save changes

* Redshift passes tests

* Fix placeholder

* Fix placeholder

* Rename execution to run

* Rename execution to run

* Rename execute to run on the backend

* Rename execution to run

* add default jobs for the default tags

* Snowflake and SQLServer passing tests

* Fix issues stemming from BE renames

* Rename execution to run

* Rename execution to run

* Rename execution to run

* assorted updates

* Rename execution to run

* E2E tests

* E2E tests

* E2E tests

* E2E tests

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

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

* fix `api.transform-job-test`

* E2E tests

* E2E tests

* Add inverse to tag insertion

* Fix whitespace in yaml (my favorite ;)

* E2E tests

* Add defaultly-tagged jobs back in

* Fix mysql migration (rollback order)

* Appease migration linter

* Oops

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

* E2E tests

* E2E tests

* E2E tests

* don't run transforms on audit dbs

* Isolate transforms tests from regular test data

* Woof! Migrations now lint correctly

* m. changeset ids (sorry)

* E2E tests

* Better delete rollbacks

* Whitespace

* Last whitespace lint issue

* E2E tests

* Brain fart mistake.

* Remove excess drop table

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Better rollback for mysql

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* better error message when target already exists

* Get API tests passing again

* Add some multimethod unit tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* timeouts use a setting

* jobs check whether things are already running

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Change default job names.

* E2E tests

* E2E tests

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

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Fix execute test

* E2E tests

* E2E tests

* Allow nil schema in api

* E2E tests

* Run all transforms tests on ci

* Fix mysql ordering

* E2E tests

* Cancel targeting for worker_run_cancelation deletion

* E2E tests

* E2E tests

* only postgres supports transforms

* Rename worker_* to transform_*

* E2E tests

* Delete tag initialization

* E2E tests

* Fix up API tests, get BigQuery working

* Remove bigquery support flag for transforms/table

* worker_run_cancelation -> transform_run_cancelation

* No more worker

* Add missing file

* make transform_id and transform.id types consistent

* QUE-2140

* Remove views/materialized views

* Seed transforms data at startup

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

* m.

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* convert localized strings into actual strings on job seed insert

* fix some tests

* add docstrings for transforms api routes

* E2E tests

* E2E tests

* E2E tests

* E2E tests

* Migration fix?

* Revert "Migration fix?"

This reverts commit a4704c2203.

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* Migration fix?

* readd accidentally deleted h2 defmethod

* don't serialize transform models

* Remove with-transform-runs

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

* cleanup ns

* Remove with-transform-tags

* Fix silly tru mistakes

* Remove test-transform

* Migration fix?

* Simplify tests using defaults

* Migration fix?

* cljfmt

* cljfmt

* Use with-temp

* Seed tags/jobs based on internal setting

* cljfmt

* cljfmt

* cljfmt

* Better cleanup in tests

* assorted kondo and transform job hydration updates

* FE tests

* remove worker from config.edn

* start running all tests again

* Kondo transform_job.clj

* Kondo models/transform.clj

* Kondo models/transform_job.clj

* Kondo models/transform_run.clj

* FE tests

* test fixes

* Kondo ordering.clj

* Kondo schedule.clj

* test fixes

* test fixes

* test fixes

* test fixes

* FE tests

* Fix models?

* Fix models?

* m. cleanup

* Fix tests

* kondo passes

* Add entity ids

* Make entity_id s nullable

* Re-add entity ids to seeded tags and jobs

* Use model names in seed tests

* Better relative positioning in UI for tags

* Rename join tables

* Fix tests

* Fix tests

* Update entity_id

* kondo

* formatting

* formatting

* e2e test for default jobs and tags

* e2e test for default jobs and tags

* Remove transforms-gating for transforms default value seeding.

* e2e test for default jobs and tags

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* sql seed first stub

* add tests

* add tests

* add tests

* add tests

* add tests

* Comment out failing test

* Fix kondo complaints

* Remove unique constraint on tag name.

* Lint fix.

* Re-add necessary rollbacks for old SQL versions

* Re-add timeout and cancelation on timeout

* update changelog

* Remove transforms-seeded setting

* Last bits of cleanup from local review

* Add transforms.jobs to init

* Missed a DRY spot.

* Fix schemas

* Remove dead code

* Merge master

* Merge master

* Remove dead code

* linter

* update transform job run when already-run transform completes

---------

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

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

* Apply suggestions from code review

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

---------

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

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

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

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

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

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

* Ditch overall sidebar for now (#61523)

* Remove list of cards sidebar

* Some type fixes

* Review fixes

* feat: associate in_report cards w/ report_document

* feat: associate cards with reports in create

* better markdown serde

* switch to prosemirror ast

* chore: add enterprise card test

* remove snapshots

* less redux

* send used card ids

* drop flushSync error

* remove replace question, drop refresh question

* fix backend not starting

* saving new report should not show LeaveRouteConfirmModal

* polish

* Insert into reports from metabot (#61642)

* insert from metabot

* Metabot plugin and hook

* make stuff nicer

* cleanup

* no more snapshots

* run build and docker uberjar on push

* remove trigger for uberjar

* Print Report

* cleanup

* always create a card clone when embedding

* always clone non in_report cards

* disable metabot sidebar on mob+b

* stop header bouncing

* jumping layout when loading

* why scroll to bottom when opened

* gross emojis

* cleaning up emoji ui a bit

* icons

* fe: reports -> documents

* update metabot question creation parsing

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

* do not leak prosemirror styles into charts

* chore: rename everything to document (#61743)

strip out snapshotting code

* fix FE usage of documents api

* fix embedding dashboard-only cards to documents

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

* mention all entities

* split mention vs command, allow mentioning other entities

* paste smartlinks

* missing import

* fix links to tables

* fix layout

* auto focus on title on new documents

* UXW-404 Improves image formatting

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

* Fix issues with multiple in-flight requests

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

* Document Metadata

* Fix some CI issues

* Persist cards when saving document (#61818)

* chore: remove document version model

* persist cards only when saving documents

* chore: remove in_document type

* feat: return document creator

* feat: save cards with parameters pass in as cards

in POST and PUT requests to documents

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

search, recents, collection items

* chore: fixup search and card tests

* contract

* feat: update document ast with new card ids

* fix: report -> document in collection api

* fix: ws

* feat: clone cards not associated with document

* chore: add tests for document permissions

* fix contract

* fetch root collection

* update message

* must be working now

* fix sidebar

---------

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

* wip but working sql query editor in documents

* feat: revision history for documents

* feat: include revision info in collection tree res

* document entity

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

* feat: allow documents to be archived

* Document Collection Item Caching

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

* fix UXW-412 again

* feat: allow documents to be bookmarked

* fix: hide documents in collection items if not EE

* fix: add perms info to documents in collections

* fix: always add documents to bookmark lookup

* feat: add document delete endpoint

* fix: require non-blank string for name

* App Bar Breadcrumbs for documents

* fix: tests and lints

* fix: ordering of migrations for mysql

* fix: for OSS tests

* fix: tests and kondos

* fix: module sort

* New metabot documents API

* UXW-400: formatting floating menu

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

* swap icon

* l10n

* fix: bad var reference in tests

* undo moves should work once archived is boolean

* Show tooltip with precise time in document metadata

* Updates MetabotEmbed to work with upcoming BE changes

* Updates MetabotEmbed to always use draft cards

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

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

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

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

* fixed drills & query editing for metabot cards

* fix: foreign key indexes

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

* fix: add entity id column to documents

* add title to untitled docs

* UXW-453 Fix 404 when clicking draft card title

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

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

* hide object detail row in document tables

* UXW-459 Fix issues with LeaveRouteConfirmModal and new documents

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

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

* improved mention and command

* clean

* fix replace question

* do not show bubble menu on disallowed nodes

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

* Localizes "Created with Metabot" text

* drop emojis

* no emojis and markdown downloading

* fix metadata fetching

* initial e2e tests

* fix: set null on collection cascade for documents

mirrors behavior for dashboards and cards

* fix: remove documents token hack

* feat: documents in search

Also supports view_counts and last_viewed_at for documents

* fix: emit documentment read on api get

* fix: in_place search fixes and test fixes

* fix: migration order

* fix: set type to :question dashboard_id to nil

* fix: more in-place search fixes for documents

* fix: final in-place search test fixes

* fix: handle inadvertent documents in oss tests

* mention + command feedback

* placeholder

* fix command search

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

* fix command

* feat: support pinning documents

* fixup! pinning reconcilation with documents

* feat: support serdes on documents (#62032)

* fix: kondo warning on unused var

* updated styles

* bump padding

* Markdown Loki Test

* UXW-462 Adds database picker in metabot block

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

* refactor

* feedback on the command

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

* improve state management UXW-463 UXW-450

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

* feat: add documents to recents

* fix: whitespace and round-trip serdes test

* fix: whitespace exclusion path

* fix: token features in recent views test

* Able to generate sql charts

* fix: casing in tests

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

* more e2e tests

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

* Update menu items (#62072)

* Update commands and remove descriptions

* Removes unused code

---------

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

* feat: return can_restore, can_delete for docs

* Updates Document type with newly added properties

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

* Move, Archive, and Bookmark in documents page

* bury shame

* UXW-472 Adds ArchivedEntityBanner for documents

* fix: remove extraneous precondition migration

* UXW-451 Adds some light dataset error handling

* Reverts probably-accidental change

* feat: check for name length

* Reports fix fe ci (#62046)

* Fix some CI issues

* Fix some CI issues

* Fix typecheck issues

* Fix lint

* Fix unit tests

* Fix e2e tests

* fix pivot query editing in documents

* better command popover positioning

* UXW-473 fix layout

* fix z-index

* only include tables you can use for native query builder

* Fix typecheck

* Light documents metabot cleanup

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

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

* cleanup

* attempting to get a card embed in storybook

* Fix documents stories

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

* fix: bookmark inside a collection error

* Removes now-unused extensions

* chore: tests for metabot tools

* Add token check on the FE

* fix: remove unused ns from test

* Review fixes

* Revert token check

* Add token check on the FE

* fix: correctly serialize token status to FE

* Fix e2e tests (#62113)

* Fix e2e tests

* Fix e2e

* fix: use adhoc metadata if card id is negative

* chore: add tests for isSavedCard guard

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

* Fix typecheck

* fix: token feature tests

* fix: add docs to stats ping

* Fix typecheck

* Fix e2e

* Reverts now-unnecessary changes

* Reverts more now-unnecessary changes

* Address cubic PR feedback (type guards)

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

* Fix e2e

* PR feedback (code cleanliness)

* PR feedback (simplify custom node definition)

* adding loki references

* delete loki reference files

* adding missing loki reference files

* auto-fix generated sql (#62167)

---------

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

* PR feedback (unit test + remove unused classes)

* addressing some minor feedback

* chore: add table utils tests

* review

* Cleans up types

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

* review

* cleanup documents selectors

* remove unnecessary type cast in visualizationUtils.ts

* remove versioning mention in comments

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

* Code review fixes

* remove inline styles from FormatButton

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

* remove inline styles

* drop unused suggestion styles

* consistent hook names

* drop unused dep

* remove any from DocumentPage

* clean up change callbacks of the editor component

* drop unused onClode prop in EmbedQuestionSettingsSidebar

* provide correct reportTimezone to ModifyQuestionModal

* make runQuestionQuery optional

* NativeQueryModal cleanup

* clean up NativeQueryModal

* drop unused code in useDocumentState

* unnecessary casting

* reset error state

* drop unused prop

* bubble menu disallowed nodes

* dedupe similar hooks

* review

* fix: kondos

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

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

* fix: PR comments

* fix: remove schema ns

* Potential fix for e2e test failing on CI only

---------

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

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

* Fix typo in gate test: documen -> document

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

* make starburst not required

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

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

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

* Fix e2e tests

* Fix e2e tests part 2

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

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

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

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

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

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

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

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

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

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

---------

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

* copy docker compose, add defenterprise integration

* WIP getting the integration working

* fix up reindex! call

* fix whitespace

* kick ci

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

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

* Add a couple of helpful comments for manual testing

* Add ability to change db-url at the repl

* Add can-read? checks for search results

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

* sort kondo modules

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

* remove a blank line

* fix remaining clj-kondo issues

* Add semantic search test workflow (#61065)

* Add new workflow for semantic search

* Add a quick example test to see if things work

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

* Sparks of joy

* Add a delay to appease the kondo gods

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

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

* fix results postprocessing, add verified field to search index

* scaffold a basic query test

* index filtering tests

* quicky and dirty implementation of the requested ui changes

* Add basic connection pooling + tests

* Fix test indentation

* add test for verified content, refactor tests a bit

* address comments

---------

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

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

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

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

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

* update tests

* Register semantic-search premium feature

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

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

* Fix t2-instance derivation from search docs

Lookup in database as the search document model is lossy

* Test collection based permission checks apply to search results

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

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

* fixups

* fixups

* fix up error in tests

* add semantic-search to stats ping to quiet test

* quiet another test

* fix whitespace

* fix kondo warnings

* fix up and simplify embedding tests

* fix core init test

* fix more tests

* tweak setting defaults + comments, remove debugging code

* fix compilation

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

* fix lint issues

* Batched index updates for semantic search (#61117)

* kick ci

* Add comment to trigger reindex job

* Fix docstring typo

* Batch index updates for semantic search

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

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

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

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

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

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

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

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

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

* Add tests for batched index updates

* Disable flaky tests

* Fix up issues post-rebase

---------

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

* Fix accidental blocking search index init (#61200)

* kick ci

* Fix accidental eager index initialisation

---------

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

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

* Batch calls to openai according to token counts

* refactor

* mock the new batch embedding function

* mock both batched and unbatched embedding functions in tests

* a little code consolidation

* address comments

* Init db connection in reindex! if needed

* Add more DB existance checks for safety

* fix fe tests

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

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

* fix whitespace

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

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

* Don't wrap batched index updates in a transaction

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

* Filter indexed entities from semantic search index

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

* Create HNSW index on semantic search embeddings column

* Add test for HNSW index creation

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

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

* Fix batch-delete! log message

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

* fix document filtering

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

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

* Better batching for semantic search (#61299)

* streaming embedding results to the index-updating code

* rework

* suppress kondo

* Parameterization refactor (#61328)

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

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

* Add embedding-model parameter

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

* Reduced redundancy

* Embedding test fixes

* Fixup comments

* Fix rebase goofs

* Fix tests again

* Joy

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

* Keep index name in the index structure

* English is a hard language

* Remove `:redef` we no longer want

* Another merge goof fix

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

* Fix bug in associating batched embeddings with original documents

* tweak

* add log

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

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

* rrf based hybrid search implemented

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

* fix final result ranking

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

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

* Move postgres tsvector util tests

* gracefully handle nil names

* switch back to raw embedding literals but validate their contents

* add back perm checks (whoops)

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

* tweak cutoff again, fix create index test

* remove str/replace usage bc it seems unneeded

* fix rrf calc

---------

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

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

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

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

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

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

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

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

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

* Make log levels / messages more consistent

* Remove vestigial populate! reference

* Record actual token usage as reported by OpenAI API response

* BOT-255 Index metadata system (#61379)

* Add index-metadata system

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

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

* Kondo

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

---------

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

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

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

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

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

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

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

* Cleanup whitespace

* Add native-query-test

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

* Add upsert-index!-tsvectors-test

* Remove unecessary :raw wrapper from column names

* Remove unused =? alias

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

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

* make table names slightly shorter

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

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

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

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

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

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

* split off provider name to make index shorter

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

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

---------

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

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

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

* Move more helpers into semantic.test-util namespace

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

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

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

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

* BOT-258 semantic indexed entities (#61527)

* kick ci

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

* fix results postprocessing, add verified field to search index

* scaffold a basic query test

* index filtering tests

* quicky and dirty implementation of the requested ui changes

* Add basic connection pooling + tests

* Fix test indentation

* add test for verified content, refactor tests a bit

* address comments

---------

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

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

* Init permission support for indexed entities

* fix kondo

* Fix rebase errors

* Fix rebase errors

* pr feedback

* unit test index entity perm filter

---------

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

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

* kick ci

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

* fix results postprocessing, add verified field to search index

* scaffold a basic query test

* index filtering tests

* quicky and dirty implementation of the requested ui changes

* Add basic connection pooling + tests

* Fix test indentation

* add test for verified content, refactor tests a bit

* address comments

---------

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

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

* Remaining search filter support minus has_temporal_dimensions

* ignore public API warning about metabase.search.filter

* Fix collection filter impl

* fix kondo

* [no ci] remove comments

* More efficient querying

* Fix rebase errors

* fix merge

---------

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

* try something else

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

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

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

* remove limit and SET random_page_cost

---------

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

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

* Improved logging; base64 embedding

* trim double

* Use parse-double over parseDouble

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

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

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

* fix: calc for batches

* semantic search instrumentation (#61790)

* intrument semantic search

* test for analytics

* typo

* fix: id is numeric

* move test next to metrics one

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

* add test

* lift util

* feat: add full api test

* fix: appdb available when search-engine is semantic

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

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

* Dedupe combined results

* Bump up hybrid search query limit + make it configurable

* tweak setting doc, fix reflection warning in test code

* clean up tests

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

* fix lint issues

* ensure tests set semantic-search feature

* Do not realise document reducibles (#61860)

* wip

* batched streaming upsert-index!

* fix: actually dedupe searchable_text

* Revert "try something else"

This reverts commit eec29881c5.

* can still inner seq

* push indexed-entities last

* fix: semsearch delete

* lift delete-from-index-batch-sql

* test

* dedupe test

* style

* comment

* indexed entities last in search

* Semantic search test fixes (#61884)

* Fix api-engine-switching-test

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

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

This reverts commit 33386c602b.

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

* remove compose-fixtures

* Revert "remove compose-fixtures"

This reverts commit 16c882a599.

* another test

* test

* add back some of core-test

* comment out all code but leave in ns

* add back fixtures

* add back one test

* replace with stub test

* remove compose-fixtures

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

* oops, add back :once

* also revert back fixture order

* more cleanup

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

* Fix db test

* Only fetch embeddings when needed (#61918)

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

* feat: cache on already seen embeddings

* add test

* distinct-on content

* better logging

* reuse test impl

* note

* repl utils

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

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

* fix tests

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

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

* Refactor to remove search.engine/scorers

* Add new index columns required by scoring expressions

* Add metadata score to semantic search backend

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

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

* Fix failing pgvector query test

* Adjust rrf weight to fix failing query tests

* Add premium scorers for verified and official_collection

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

* Add scoring tests

* Fix for permissions issue in test

* Remove extra whitespace in bindings

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

* wip

* clean up and better abbrev logic

* fix provider references

* remove magic int

* do not munge model name if not needed

* add / fix tests

* make mock index have a shorter name

* shorten nanoid

* math was not mathing

* fix kondo error

* death by lints

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

* Add document gating

Adds a document gating mechanism and async indexing job.

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

* Fix some test docstrings

* Fix some loop tests

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

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

* Add a quick candidate-filter byte equality test

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

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

* Replace candidate filter with simple set of last seen

Use TEXT for hash for eq convenience.

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

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

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

* Check if engine enabled and supported during indexer task

Previously was only checking if the db was configured.

* Be more careful about Instant and timestamp representation.

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

* Fix up some asserts that still reflected byte hashes

* Add a quick e2e index everything test.

Find horrific pagination bug. Fix that.

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

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

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

* Test fixes

* Joy

* Add indexer docstring

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

* parallel batch processing for index updates

* tweak setting docs

* switch back to transducing version

* Revert "switch back to transducing version"

This reverts commit 4a99c3c6869e28f56d794d8057f006700cfc8432.

* fix setting name

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

* fix tests

* add concurrency test

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

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

* Switch to custom retry handler

* Still wrap executor in a delay for lazy initialization

* Fix upt ests

* Fix final tests

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

* remove disable semantic search filter

* fix failing test

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

* Collapse indexed-entity ids in semantic search results

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

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

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

* Fix test failure due to overly long index name

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

* Use dimensions param in OpenAI api calls

* Use starts-with?

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

* Add prometheus metrics to track appdb search fallback logic

* undo broken function call

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

* fix more tests

* Tweaks

* Try again to fix tests

* Address comments

* update docstring

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

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

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

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

* Add test for extract-base64-response-embeddings

* Add test-get-embedding

* Semantic search indexing status endpoint (#62082)

* add search-items-count function

* Add endpoint for reporting indexed count + total estimate

* try to fix test

* Temp commit to debug CI failure

* Add honeysql classpath to debug output

* Revert "Add honeysql classpath to debug output"

This reverts commit 4395f420f7.

* Revert "Temp commit to debug CI failure"

This reverts commit 36fbf047d6.

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

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

For example, in earliers versions

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

produced an sql string like

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

but on 2.7.1340 you get

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

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

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

* switch init/reindex to gated updates

* nil stats

* sync index in test

* non deterministic search result

* Semantic search migration (#62043)

* Migration

* Rebase follow-up

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

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

* fix type issue

* Fix serialization baseline test

* finished

* small fixes

* do not animate progress bar when progress === 100

* impl PR feedback

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>

* revert e2e diffs (#62173)

* Re-order semantic search index columns to test schema migration (#62172)

* Re-order semantic search index columns

Mostly to test schema migration, but this also makes the table contents easier to scan in PgAdmin / psql imho by
putting ids next to ids, timestamps next to timestamps, etc.

* migration 1

* cleanup

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* fix reflection warnings in tests (#62151)

* fix reflection warnings in test

* just use bound-fn*

---------

Co-authored-by: Dan Stone <wotbrew@gmail.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Tyler Plude <tsplude@gmail.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: Mihael Konjević <konjevic@gmail.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-08-15 15:17:51 +01:00
Jeff Bruemmer
384288806b fix links (#62193) 2025-08-15 08:59:59 -04:00
Timofey Kachalov
f7e06aac9d refactor(sdk): Add type-checking for SDK Bundle exports (#62202) 2025-08-15 15:56:29 +04:00
Timofey Kachalov
16232d530b refactor(sdk): Rename component-level MetabaseProvider to ComponentProvider (#62175) 2025-08-15 14:48:57 +04:00
Maz Ameli
3035ab0fb4 Add company, currency, and receipt icons (#62196)
* add company currency and receipt icons

* add new icons to IconName and Icons obj

* Remove duplicate 'currency' icon declaration

---------

Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>
2025-08-15 10:07:33 +03:00
Cam Saul
fe43845ee2 API Keys module cleanup (#62116)
* API Keys module cleanup

* Test fixes 🔧

* Fix Kondo errors

* Unmark these tests as `^:parallel` for now because I do not have the energy for dealing with MySQL

* I don't have time to fight MySQL

* Test fix 🔧
2025-08-14 16:08:58 -07:00
Cam Saul
bf85745bbb add-alias-info => Lib and misc bug fixes (#60231)
* add-alias-info => MLv2

* Restore deleted test

* WIP

* WIP [ci skip]

* Ensure we're actually using a cached metadata provider in tests

* Remove profiling code

* Restore accidentally-deleted `native-query-snippet` fn

* Fix accidental edits

* Make `visible-columns` stage-only

* More minor caching improvements

* cljfmt & kondo

* More minor caching improvements

* Fix #35252

* cljfmt & kondo

* Another round of test fixes and lint fixes 🔧

* Test fixes 🔧

* Test fix 🔧

* PR feedback

* Test & Lint fixes 🔧

* Test fix 🔧

* Kondo/cljfmt

* Appease Eastwood

* cljfmt run against everything

* Revert changes to deps.edn

* Did I fixx??

* cljfmt/kondo

* Fix Oracle test failure

* Fix nested fields (MongoDB)

* cljfmt

* Nested column name fixes

* Fix Mongo for reals

* Revert BigQuery breaking stuff

* Fix equality for binned columns

* Test fix 🔧

* Remove dead :ident keys

* Fix is_verified field refs

* Fix is_verified field refs

* Some sanity checking

* Fix typo

* Fixx

* Ok, don't be super fussy about bad code using :type/Text as a parameter

* Fix validation of legacy expression refs inside stage parameters

* Fix aggregation names not being deduplicated

* :as-alias

* replace saigon with bangkok

* use ho chi minh as equivalent replacement

* use bangkok for sqlserver

* update us/pacific to america/los_angeles

* Test debugging

* Fix debugging

* Test fixes 🔧

* Fix busted hardcoded e2e query and add disallowed-keys helper

* cljfmt

* Update deprecation notices 56 => 57

* Kick the can down the road

* Fix another busted test 🔧

* Improve field resolution even more 😒

* cljfmt

* Fix sandboxing with bad field refs.

* Ok I give up I guess I just accidentally fixed sandboxing with custom columns

* cljfmt

* I fixed it

* Appease the linter

* Test fixes 🔧

* OOOPS

* Fix test

* prettier

---------

Co-authored-by: Riley Thompson <rileythompson99@gmail.com>
2025-08-14 13:50:12 -07:00
Sloan Sparger
250f5453fb [Metabot] User feedback (#62048)
* UI for metabot feedback

* copy and spacing tweaks (#62049)

* switch to download based approach

* test

---------

Co-authored-by: Maz Ameli <maz@metabase.com>
2025-08-14 14:18:58 -05:00
Marcos
3334d7ad75 Add secondary role explanation for snowflake impersonation to docs (#62178)
* add secondary role explanation for snowflake impersonation

* fix with suggestions

* fix impersonation docs with suggestions
2025-08-14 16:02:50 -03:00
Phoomparin Mano
b9ccb9c883 Fix embed flow persistence by reducing scope of persisted items (#62177) 2025-08-14 18:27:30 +00:00
Aleksandr Lesnenko
5144a0c868 delete unused snapshots (#62180) 2025-08-14 18:09:35 +00:00
Timofey Kachalov
940be59861 feat(sdk): Add etag-based caching for the Hosted Embedding SDK bundle (#61283) 2025-08-14 20:28:13 +04:00
Jeff Bruemmer
63a634de52 update generated docs (#62138) 2025-08-14 12:27:01 -04:00
Jeff Bruemmer
2c62a6763b update env var doc gen script (#62068) 2025-08-14 09:58:36 -04:00
Chris Truter
da57ec87d0 Improve input_type assignments in /actions-v2/execute-form (#62097) 2025-08-14 15:55:23 +02:00
Nicola Mometto
751254246a populate field-values during get-field-values tool if not present (#62020)
* BOT-285: ensure field statistics are populated

* chore: test

* extend field-values treatment to dummy tools

* no more need for ensure-field-values!

* chore: use get-or-create

* style

* remove unused require

* fix

* nil safety

* extract
2025-08-14 12:42:24 +00:00
Nicolò Pretto
13835ef100 refactor(simple-embed): drop MetabaseEmbed and pass to the iframe the component name (#61967)
* wip

* wip2

* fix and wip

* wip

* fiiiix

* use the component name inside the iframe

* fix tests

* use custom elements attributes in the preview

* clean up

* clean up

* merge question with new question in the iframe code

* remove SdkIframeEmbedTagSettings

* styles -> S

* restore defaultTheme functionality that was merged on master

* fix test, now the iframe is not reset and we don't need to select the table again
2025-08-14 14:21:27 +02:00
Timofey Kachalov
f3ef92f7ca fix(sdk): Scope Mantine styles to SDK (#62103) 2025-08-14 15:39:12 +04:00
Ngoc Khuat
49389aea80 Send dashboard subscription with attachments only (#61784) 2025-08-14 05:25:00 +00:00
Timofey Kachalov
240160f605 Add an eslint rule that warns for external references inside the Embedding SDK NPM package code (#61417) 2025-08-14 02:06:15 +04:00
Jeff Bruemmer
7aeb66ccce docs - add JS to table and list of links (#62135) 2025-08-13 17:42:06 -04:00
Jeff Bruemmer
3721cd73ba data sandboxing -> row and column security (#62132) 2025-08-13 20:24:54 +00:00
Timofey Kachalov
840c232c5f refactor(sdk): Adjust SDK CLI to work with Hosted Bundle (#61406) 2025-08-14 00:21:00 +04:00
Alex Yarosh
f277e1f0c3 docs: JSON unfolding (#62129)
* Update json-unfolding.md

* Apply suggestions from code review
2025-08-13 16:19:15 -04:00
Alex Yarosh
d0ab801141 Update translations.md (#62127) 2025-08-13 16:18:19 -04:00
Edward Paget
b44c4d3c8e fix: handle special cased migration (#62110) 2025-08-13 14:31:32 -05:00
Timofey Kachalov
1b3446fe16 feat(sdk): SDK Backward Compatibility support via Hosted Bundle (#60554) 2025-08-13 23:19:43 +04:00
Ngoc Khuat
7948d6df58 Update channel test permission model (#62015) 2025-08-13 18:28:25 +00:00
Phoomparin Mano
5062575687 Default is-save-enabled to false on Embed JS and embed flow (#62094) 2025-08-14 01:02:30 +07:00
Riley Thompson
821510a5c4 Replace Asia/Saigon with Asia/Ho_Chi_Minh (#62105)
* replace saigon with bangkok

* use ho chi minh as equivalent replacement

* use bangkok for sqlserver

* update us/pacific to america/los_angeles
2025-08-13 17:22:01 +00:00
Nicolò Maria Mezzopera
fe478e275a Fix: Don't containerize on doc-only change and explicit artifact name (#62091)
* Fix containerize job to only run when uberjar succeeds

The containerize job now properly checks that the uberjar job succeeded
before attempting to containerize. This prevents containerization from
being triggered on documentation-only changes where the uberjar job
is skipped.

Added: needs.uberjar.result == 'success' condition

* Set default output name for fetched artifacts to "metabase.jar"
2025-08-13 12:01:00 +02:00
Phoomparin Mano
2e884c4ce6 CodeMirror styling in custom expression fails in Embed JS as the CSP nonce is missing (#61959)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-08-13 16:03:53 +07:00
Phoomparin Mano
57a07bdb4c Allow downloads should show even when drills is off (#61969) 2025-08-13 16:03:26 +07:00
Chris Truter
9586169df9 Move actions to the right timezone (#62073) 2025-08-13 10:27:05 +02:00
Chris Truter
3c955df9e9 Prevent configuration of disabled database-local settings (#62018)
- Add :database-feature to SettingDefinition schema to specify required driver features
- Update validate-settable-for-db\! to check database driver feature support
- Add validation to ensure :database-feature is only used with database-local settings
- Fix validation logic to throw when driver does NOT support required feature
- Add comprehensive tests for database feature validation
- Update defsetting macro documentation with :database-feature option

This allows database-local settings like database-enable-actions and
database-enable-table-editing to require specific driver features
(e.g. :actions, :actions/data-editing) before they can be enabled.
2025-08-13 11:24:55 +03:00
Jeff Bruemmer
a36b1553ee docs - images and edits (#62064) 2025-08-12 21:09:19 +00:00
Alex Yarosh
0cfee32754 docs: DB routing new DBs (#62081)
* db routing update

* Apply suggestions from code review

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-12 20:47:58 +00:00
Nicolò Maria Mezzopera
22507a963a Fix CI workflows nesting and artifact download (#61919)
* Fix uberjar containerization and implement flexible fetch-artifact action

Resolves issues where uberjars weren't getting containerized when adding the
build-docker-uberjar label to PRs or when manually dispatching workflows.

Major changes:
- Create containerize-uberjar.yml workflow for centralized containerization logic
- Create uberjar-containerize-labeled.yml for PR label-triggered builds
- Extract containerization from uberjar.yml to avoid 3-level workflow nesting
- Add containerization to run-tests.yml for master branch pushes
- Implement flexible extract-path parameter in fetch-artifact action
- Replace preserve-structure boolean with string-based path specification
- Update all workflows to use appropriate extract-path values

The fetch-artifact action now supports:
- extract-path: "." (current directory with custom output-name)
- extract-path: "target/uberjar" (maintains original structure)
- extract-path: "custom/path" (any directory structure)

Containerization now works in all scenarios:
- Master push/merge → run-tests.yml → containerize-uberjar.yml
- PR with build-docker-uberjar label → uberjar-containerize-labeled.yml
- Manual dispatch → containerize-uberjar.yml

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix fetch-artifact action to avoid moving file to itself

Prevents "mv: source and destination are the same file" error when
extract-path matches the existing jar location (e.g. target/uberjar).

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Refactor fetch-artifact action to be more DRY

- Consolidate JAR path logic into a single function
- Export JAR_PATH to GITHUB_ENV for use in subsequent steps
- Remove repetitive path determination code
- Reduce lines of code from 113 to 108

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add Docker Hub link and pull command to PR comment

Enhanced the PR comment after containerization to include:
- Docker tag name (branch with slashes replaced by dashes)
- Direct link to Docker Hub repository tag page
- Ready-to-use docker pull command

This makes it easier for developers to find and pull the built image.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Add get-docker-info action and update workflows to utilize it for Docker image retrieval

* Refactor post-comment job to streamline Docker info retrieval and PR comment posting in containerize workflow

* Remove unnecessary blank lines in fetch-artifact and get-docker-info actions for cleaner code

* Update containerize job conditions to trigger on pull request labels for Docker builds

* revert using fetch-artifact for release artifacts
2025-08-12 10:19:08 -10:00
Alex Yarosh
e9ab99a8f1 docs: add saml to embed JS (#62074)
* Update embedded-analytics-js.md

* Update docs/embedding/embedded-analytics-js.md

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-08-12 19:22:24 +00:00
github-automation-metabase
a12945b800 Bump org.apache.commons/commons-compress from 1.27.1 to 1.28.0 (#61777)
Inspect dependency changes here:
2025-08-12 16:23:06 +00:00
Riley Thompson
8c049ad6fe Only test normal drivers in nested-array-query-test (#62045)
* only test normal drivers

* run tier 3 if changes in src/metabase/driver
2025-08-12 15:41:27 +00:00
github-automation-metabase
d50129f95c Bump com.github.seancorfield/honeysql from 2.7.1310 to 2.7.1340 (#61772)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1340/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 15:01:26 +00:00
Jeff Bruemmer
99c391fb9f field filter intro (#62059) 2025-08-12 08:06:53 -05:00
Anderson
47f6a9ac46 chore: add andsalves as a team member (#62041) 2025-08-12 10:04:30 -03:00
github-automation-metabase
0f0d91d824 Bump com.microsoft.sqlserver/mssql-jdbc from 12.10.0.jre11 to 13.1.1.jre11-preview (#61486)
Inspect dependency changes here:

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 23:00:29 -07:00
github-automation-metabase
dd41094d50 Bump org.eclipse.jetty/jetty-server from 12.0.22 to 12.0.24 (#62001)
* Bump org.eclipse.jetty/jetty-server from 12.0.22 to 12.0.24

Inspect dependency changes here:

* Consolidate Jetty deps bumps

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 22:59:35 -07:00
github-automation-metabase
676c64a2aa Bump clj-kondo/clj-kondo from 2025.04.07 to 2025.07.28 (#61771)
* Bump clj-kondo/clj-kondo from 2025.04.07 to 2025.07.28

Inspect dependency changes here: https://github.com/clj-kondo/clj-kondo/blob/v2025.07.28/CHANGELOG.md

* Fix some of the Kondo warnings -- seems like there are false positives

* Fix Kondo warnings

---------

Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 22:21:13 -07:00
github-automation-metabase
709df6c4ac Bump com.facebook.presto/presto-jdbc from 0.292 to 0.293 (#59521)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:14:27 -07:00
github-automation-metabase
f2096262fa Bump org.graalvm.polyglot/polyglot from 24.2.1 to 24.2.2 (#61248)
* Bump org.graalvm.polyglot/polyglot from 24.2.1 to 24.2.2

Inspect dependency changes here: https://github.com/oracle/graal/compare/graal-24.2.1...graal-24.2.2

* Consolidate GraalVM deps bumps

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Cam Saul <github@camsaul.com>
2025-08-11 20:14:03 -07:00
github-automation-metabase
73763282b7 Bump org.apache.logging.log4j/log4j-core from 2.24.3 to 2.25.1 (#60904)
* Bump org.apache.logging.log4j/log4j-core from 2.24.3 to 2.25.1

Inspect dependency changes here:

* Merge other Log4j version bumps

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Cam Saul <github@camsaul.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:12:16 -07:00
github-automation-metabase
43f07d3c88 Bump net.clojars.wkok/openai-clojure from 0.22.0 to 0.23.0 (#61776)
Inspect dependency changes here: https://github.com/wkok/openai-clojure/blob/0.23.0/CHANGELOG.md
2025-08-12 02:32:30 +00:00
github-automation-metabase
ecc7d9ba86 Bump io.github.clojure/tools.build from 0.10.9 to 0.10.10 (#61775)
Inspect dependency changes here: https://github.com/clojure/tools.build/blob/v0.10.10/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-12 02:32:22 +00:00
github-automation-metabase
c9205461c1 Bump com.google.cloud/google-cloud-bigquery from 2.51.0 to 2.54.0 (#61778)
Inspect dependency changes here: https://github.com/googleapis/java-bigquery/blob/v2.54.0/CHANGELOG.md
2025-08-12 02:32:08 +00:00
github-automation-metabase
65974dc29d Bump clj-http/clj-http from 3.13.0 to 3.13.1 (#60246)
Inspect dependency changes here: https://github.com/dakrone/clj-http/blob/3.13.1/changelog.org

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 02:31:52 +00:00
github-automation-metabase
b452abc839 Bump djblue/portal from 0.59.2 to 0.60.2 (#61997)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.60.2/CHANGELOG.md

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 01:52:21 +00:00
github-automation-metabase
debcec5881 Bump io.github.seancorfield/build-uber-log4j2-handler from v2.24.0 to v2.25.1 (#60900)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-08-11 18:19:12 -07:00
github-automation-metabase
2f15322530 Bump io.netty/netty-buffer from 4.2.1.Final to 4.2.3.Final (#61250)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 18:17:56 -07:00
github-automation-metabase
cce80c3f1d Bump diehard/diehard from 0.11.13 to 0.12.0 (#59517)
Inspect dependency changes here: https://github.com/sunng87/diehard/blob/0.12.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:43:56 +00:00
github-automation-metabase
5647025c0c Bump com.github.seancorfield/next.jdbc from 1.3.1002 to 1.3.1048 (#59516)
Inspect dependency changes here: https://github.com/seancorfield/next-jdbc/blob/v1.3.1048/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:41:28 +00:00
github-automation-metabase
ebb0d64993 Bump babashka/fs from 0.5.25 to 0.5.26 (#59146)
Inspect dependency changes here: https://github.com/babashka/fs/blob/v0.5.26/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-12 00:06:08 +00:00
Denis Berezin
96a1ed0b8f UX-west FE bug fixes (#61948)
* UXW-466 enterprise-login-page-logo

* fix dash subscription popover cut off #59888

* Fix collection menu tooltips position #59379
2025-08-12 02:13:18 +03:00
github-automation-metabase
8d6ba8f390 Bump ring/ring-mock from 0.6.1 to 0.6.2 (#62003)
Inspect dependency changes here: https://github.com/ring-clojure/ring-mock/compare/0.6.1...0.6.2
2025-08-11 21:14:08 +00:00
github-automation-metabase
6ee5cbf07a Bump com.nimbusds/nimbus-jose-jwt from 10.4 to 10.4.1 (#62005)
Inspect dependency changes here:
2025-08-11 21:13:05 +00:00
github-automation-metabase
aba008b9b7 Bump org.apache.tika/tika-core from 3.1.0 to 3.2.2 (#61998)
Inspect dependency changes here:
2025-08-11 21:08:59 +00:00
github-automation-metabase
a9a088ef1f Bump com.oracle.database.jdbc/ojdbc17 from 23.8.0.25.04 to 23.9.0.25.07 (#61780)
Inspect dependency changes here:

Co-authored-by: dpsutton <dan@dpsutton.com>
2025-08-11 21:05:45 +00:00
github-automation-metabase
3fc274a4cf Bump com.fasterxml.woodstox/woodstox-core from 7.1.0 to 7.1.1 (#58758)
Inspect dependency changes here: https://github.com/FasterXML/woodstox/compare/woodstox-core-7.1.0...woodstox-core-7.1.1

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-08-11 20:59:30 +00:00
bryan
ba8f1f3ccf mage: Replace blank lines with empty strings + mage ls (#61987) 2025-08-11 20:55:21 +00:00
github-automation-metabase
db122be70b Bump com.amazon.redshift/redshift-jdbc42 from 2.1.0.32 to 2.1.0.34 (#62004)
Inspect dependency changes here: https://github.com/aws/amazon-redshift-jdbc-driver/blob/v2.1.0.34/CHANGELOG.md
2025-08-11 20:42:57 +00:00
github-automation-metabase
9781d9b7cd Bump cider/cider-nrepl from 0.55.7 to 0.57.0 (#60245)
Inspect dependency changes here: https://github.com/clojure-emacs/cider-nrepl/blob/v0.57.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 13:38:13 -07:00
github-automation-metabase
3feae381dd Bump org.xerial/sqlite-jdbc from 3.49.1.0 to 3.50.3.0 (#61485)
Inspect dependency changes here: https://github.com/xerial/sqlite-jdbc/compare/3.49.1.0...3.50.3.0
2025-08-11 13:31:34 -07:00
github-automation-metabase
9c2156a025 Bump commons-net/commons-net from 3.11.1 to 3.12.0 (#61773)
Inspect dependency changes here:
2025-08-11 13:07:45 -07:00
Riley Thompson
4ac4d34af7 handle nested arrays (#61977) 2025-08-11 15:44:04 -04:00
github-automation-metabase
9a4c0bb7c3 Bump io.netty/netty-common from 4.2.2.Final to 4.2.3.Final (#61251)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-08-11 12:36:37 -07:00
github-automation-metabase
ebd8ecb06c Bump com.github.seancorfield/honeysql from 2.7.1310 to 2.7.1325 (#61481)
Inspect dependency changes here: https://github.com/seancorfield/honeysql/blob/v2.7.1325/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:27:50 -07:00
github-automation-metabase
98a9b04fb1 Bump thheller/shadow-cljs from 3.1.4 to 3.1.8 (#61484)
Inspect dependency changes here:

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:26:11 -07:00
github-automation-metabase
19f1e5517a Bump djblue/portal from 0.59.2 to 0.60.1 (#61774)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.60.1/CHANGELOG.md

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-08-11 12:25:13 -07:00
Jeff Bruemmer
ee248d5fff fix typos (#62029) 2025-08-11 17:09:12 +00:00
Jacob Joseph
b3d4d009aa Update filters.md (#61983)
we removed the gear icon from filters on dashboard editing, but the docs were still referring to it
2025-08-11 12:02:04 -05:00
Gustavo Saiani
d2f01b00eb Remove promo banner (#62023) 2025-08-11 14:01:01 -03:00
Sloan Sparger
a076cca120 [Metabot] Remove non-streaming metabot code (#61988)
* remove streaming code

* remove comment
2025-08-11 11:57:10 -05:00
Riley Thompson
42e48c71e0 Enable DB routing for Starburst and Presto (#61949)
* enable db routing for starburst

* enable presto routing
2025-08-11 16:23:59 +00:00
Riley Thompson
b3a9f566df Enable athena routing (#61934) 2025-08-11 11:22:39 -04:00
Aleksandr Lesnenko
5ef76f8592 fix visualizer cards don't have dashcard description setting (#62006) 2025-08-11 11:51:21 -03:00
Jeff Bruemmer
fbc7f9668d Update embedded-analytics-js.md (#62012) 2025-08-11 08:17:27 -05:00
Nicola Mometto
4c79e29cca Archive deleted tables (#61592)
* add migration

* add table before update to correctly set deactivated_at

* no need for schema

* archive tables

* tests

* note

* include active to index

* guard against nil changes

* doc

* guard against archival

* note

* prper count

* serdes/test

* extra safety guard

* more accurate logging

* use epocSecond

* more error validation

* change suffix

* add rollback mig

* move migrations to v56

* safer
2025-08-11 14:11:12 +01:00
Thomas Schmidt
0ab4df1655 Support markdown links in Metabot response (#61732) 2025-08-11 06:55:22 +00:00
Phoomparin Mano
4b128f68a9 Update parameters section subtitle for questions in embed flow (#61968) 2025-08-09 21:44:36 +07:00
Lodewijk Wensveen
b0687c26d2 fix(formatting): round compact numbers with Intl; preserve legacy k casing (closes #59454) (#61645)
* test(formatting): add compact rounding edge cases (refs #59454)

* fix(formatting): round compact numbers with Intl; preserve legacy k casing (closes #59454)

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2025-08-09 03:29:46 -04:00
Cam Saul
c6674c0185 [Lib] make visible-columns only work on stages (#61943)
* Make `visible-columns` stage-only

* More minor caching improvements
2025-08-09 00:35:00 +00:00
John Swanson
69b313f83e Format datetimes with user locale (#61680)
Bind the `*formatting-locale*` to the user's locale (falling back to the
system locale).

Also use `i18n/site-locale` instead of `(Locale. (system/site-locale))`,
which Does The Right Thing instead of incorrectly calling the
single-arity version of `Locale.`.

Fixes [UXW-208: Dashboard card download result using date locale from
instance and ignore user
locale](https://linear.app/metabase/issue/UXW-208/dashboard-card-download-result-using-date-locale-from-instance-and)

Fixes [UXW-142: Date formatting has undefined behavior (broken on my machine)](https://linear.app/metabase/issue/UXW-142/date-formatting-has-undefined-behavior-broken-on-my-machine)
2025-08-08 15:41:27 -05:00
Marcos
d76385094e fix examples in timezone docs (#61979) 2025-08-08 14:36:42 -06:00
Denis Berezin
772e56a62e Fix tabs alignment for horizontal tabs with grow (#61895)
* Fix tabs alignment for horizontal tabs with grow

* Review fixes
2025-08-08 23:10:55 +03:00
Oleksandr Yakushev
ab2eb8a1f9 [perf] Fix metabase.util.performance cljc-related issues (#61847)
* [perf] Fix metabase.util.performance cljc-related issues

* [perf] Move faster walk implementation into clj-only namespace
2025-08-08 22:12:39 +03:00
Denis Berezin
d1dd7964c2 fix: update loki after icon change (#61974) 2025-08-08 21:48:06 +03:00
Phoomparin Mano
a1206f3886 Fix pivot tables in static embedding having white cell backgrounds in dark mode (#61939) 2025-08-08 23:16:07 +07:00
Nicolò Pretto
6c24ddee41 test(embed-js): migrate tests to use custom element api (#61965)
* test(embed-js): migrate tests to use custom element api

* use CreateApiKeyResponse

* Update e2e/test/scenarios/embedding/sdk-iframe-embedding/sdk-iframe-embedding.cy.spec.ts

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-08-08 15:51:03 +00:00
Nicolò Pretto
e4afb704fe test(simple-embed): add test for is-saved-enabled, initial-sql-parameters and target-collection for metabase-question (#61830) 2025-08-08 17:14:08 +02:00
Edward Paget
aedb754045 fix: login_attrs -> jwt_attrs for jwt users (#61940)
* fix: login_attrs -> jwt_attrs for jwt users

Enables the new behavior where login attributes persist between jwt
logins for existing jwt-based users.

* fixup! add rollback migration

* fixup! yaml syntax
2025-08-08 08:50:33 -05:00
Alex Yarosh
1991635e2a docs: embedded analytics js (#61955)
Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-08 10:57:40 +01:00
Timothy S. Dean
8ad7691ba9 Fix revision history for old cards (#61755)
Cards created before v0.55 lack the `:card_schema` field in their revision history. When loading these old revisions, the system throws "Cannot SELECT a Card without including :card_schema" because the Card model's `after-select` expects this field to always be present.

Existing code adds the legacy default `card_schema` value (20) in `revert-to-revision!`. This PR adds the value (20) to old revisions in `revision.clj`'s `after-select`.

This allows users to view revision history and revert cards that were created before the v0.55 upgrade.
2025-08-07 19:47:40 -06:00
Denis Berezin
30df0133e7 Fix navigate forwards to a Details modal for QB (#61835)
* Fix navigate forwards to a Details modal for QB

* Add e2e tests

* Fix e2e tests
2025-08-08 03:05:35 +03:00
AlessioLaiso
c2cee019de Updates the info and info_filled icons (#61938)
* Updates the info and info_filled icons

* use currentcolor fill instead

* remove fixed width and height and rely on viewBox

* tweak svg paths slightly

* fix y position

---------

Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
Co-authored-by: Maz Ameli <maz@metabase.com>
2025-08-07 21:06:54 +00:00
Denis Berezin
812d1eceef Fix creator list UI on search page (#61936) 2025-08-07 23:44:16 +03:00
Fraser
d7653edd9d Upgrade fetch mock to v12 (#61857) 2025-08-08 07:28:15 +12:00
Cam Saul
f294fb48b7 Fix QP preprocessing middleware disabling Malli checks (#59324)
* Fix QP preprocessing middleware disabling Malli checks

* Test fix

* Yet another fix

* WIP

* Update preprocess.clj
2025-08-07 12:17:28 -07:00
Aleksandr Lesnenko
19f3c013aa fix annoying tooltip (#61883) 2025-08-07 15:36:39 -03:00
Cam Saul
5edd511b5b Finish untangling the metadata knot (#61767)
* Ensure we're actually using a cached metadata provider in tests

* Remove profiling code

* Restore accidentally-deleted `native-query-snippet` fn

* Fix accidental edits

* Fix metadata calculation for joins that contain joins

* All Lib tests are passing

* The PR that fixes everything [WIP] [ci skip]

* Test fix 🔧

* Sort namespaces

* Docstring formatting

* [Lib tests] 100 failures, 33 errors.

* [Lib] 98 failures, 24 errors.

* [Lib] 76 failures, 17 errors.

* [Lib] 49 failures, 4 errors

* [Lib] 46 failures, 2 errors.

* [Lib] 15 failures, 0 errors.

* [Lib] 13 failures, 0 errors.

* All Lib tests passing

* [QP tests] 2 failures, 1 error.

* Revert :encode/cache-key

* Minor caching performance improvements

* Fix nest breakouts/cumulative aggregations

* Add some more stuff to lib.core

* Test fixes/cljfmt/kondo

* Test fix 🔧

* Test fixes and fix some busted tests

* OMG CACHE SO MUCH FASTER!!!!!

* Fix MongoDB

* Fix tests and support mock segments

* Code cleanup and test fixes 🔧

* Test fix 🔧

* Fix set versus map

* PR feedback

* cljfmt

* More PR feedback and tighten up the field resolution code a bit

* Some schema cleanup

* PR feedback

* PR feedback

* Add TODO

* PR feedback

* Remove implementation of join `visible-columns` which is the same as :default

* Remove unused Card visible columns

* Restore the Card implementation of visible columns in THIS PR.
2025-08-07 11:25:42 -07:00
Phoomparin Mano
b46048533c fix(sdk): send CORS headers for error messages when embedding is disabled (#61808) 2025-08-07 23:46:32 +07:00
Cam Saul
d0c0516fa2 Fix busted tests from #53373 (#61899) 2025-08-07 09:06:33 -07:00
Edward Paget
eeb46a43f1 fix: jwt auth doesn't wipe login_attributes (#61927)
Missed this from the big remerge, where login attributes were being
reset to an empty value on jwt login. Also fixed not including the
jwt-group-sync on the initial formik state.
2025-08-07 11:05:02 -05:00
Phoomparin Mano
31412ebe1e Remove Beta badge from Embedded Analytics JS (#61920) 2025-08-07 22:45:47 +07:00
Phoomparin Mano
5b885a5447 Temporarily replace docs and quickstart with "Try it out" (#61926) 2025-08-07 22:45:29 +07:00
Nicolò Pretto
8df9924e76 fix(sdk): targetCollection should take precedence over recent dashboard (#61874) 2025-08-07 17:40:39 +02:00
Cam Saul
f6d3a73bb3 Add mbql-5-query macro (#61898)
* Add `mbql-5-query` macro

* Remove new test
2025-08-07 09:39:55 -06:00
Luiz Arakaki
2581cc50b4 add snowflake csid as Metabase_Metabase (#61866) 2025-08-07 14:14:37 +00:00
Cam Saul
be36bd367d More Lib metadata caching improvements and faster remove-inactive-field-refs (#61897)
* More Lib metadata caching improvements

* Faster remove-inactive-field-refs middleware
2025-08-07 10:06:22 -04:00
Roman Abdulmanov
064110eaa2 feat: endpoint for retrieve embedding token from jwt (#61540)
* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Added to_session endpoint

* Some small cleanup

- remove unnecessary try/catch clauses

- rename/rework unnecessary public wrapper fn

- make `jwt` required for the endpoint

- only return session token, not any JWT data

* Test fixes

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-08-07 08:39:01 -05:00
Phoomparin Mano
794d472d29 Tag an embed flow test "persists chart embed options" as flaky (#61865) 2025-08-07 20:28:12 +07:00
Tony-metabase
dd9668fd41 Fix Payload Type Typo for Notifications (#61823)
* Fix Payload Type for Notifications

* Update api.html
2025-08-07 14:15:26 +02:00
Nicolò Pretto
5a2c86ad40 chore(sdk): post release 56 workflow changes (#61909)
* chore(sdk): post release 56 workflow changes

* update changelogs
2025-08-07 12:22:14 +02:00
Nicolò Pretto
35a47b2418 change rspack to allow testing custom domains locally easier (#61800) 2025-08-07 09:31:05 +00:00
Jakub Chodorowicz
304d4cda21 add connection string form prefill feature (#61323)
* wip: add connection string form prefill feature;

add tests

* Refactor deprecated export format

* Skip jdbc:prefix when parsing

* Add snowflake support

* Add success message

* Add a feedback message when pasting a connection string

* Refactor field mapping

* wip use regexes to parse connection strings

* make port optional

* Add snowflake

* Add bigquery and clickhouse

* Add Athena support

* Add Amazon Redshift

* Improve clickhouse

* Add failure message

* Add databricks and druid

* Add MySQL

* Add presto

* Adapt snowflake, create objectToString helper

* Add Apache Spark

* Add SQL server

* Add Oracle

* Add Starburst

* Add vertica

* Reset connection string input on change of key

* Map only when select db and protocol matches

* Fix and refactor semicolon params parsing

* Add tracking to database string uri parsing

* create mapping config with placeholders

use placeholders also in tests

* Create engineKeys types

* Create Cypress paste command using synthetic react events

* Use fade transition for feedback animation

* Add e2e tests for connection strings form filling

* fill in display name from connection string

* Add succes failure text test

* Validate form after filling in fields

* Use more standard fallback for paste

* Remove unused regex parsing implementation

* use mass setFields for fomik setting values

* Add test case for clearing existing values, including engine select field

* Fix form fields being overwritten when pasting connection string

* Add onPaste behavior and use simpler paste mechanism in Cypress

* Fix typo

* Extract and use engineKey type and isEngineKey guard

* Make connection string field controlled by formik

Fix submit values

Fix type error

* Remove unneeded prop justify

* Run regex just for currently selected db

* Fix naming of the test file

* Add e2e db connection test

* Fix missing path in th rspack emedding setup

* Explain why connection string is not sent to BE

* use pojo instead of map for db engines config

* Revert to * export to maintain consistency

* fix connection string test

* create a more meaningful type name
2025-08-07 11:25:36 +02:00
Nicolò Pretto
211f371fd5 mock /app/embed.js in test to the dev server to have up to date version (#61598)
in e2e tests
2025-08-07 11:03:46 +02:00
Cam Saul
3a5e8d1471 QP Binning middleware => Lib (#61530)
* QP Binning middleware => Lib

* Test fixes 🔧

* Resolution should propagate fingerprints from card metadata

* Revert accidental snapshots skip
2025-08-06 16:08:45 -07:00
eliotmetabase
93ec57af84 Update Admin Webapp and DashViz to UX West (#61849)
* Update teams and modules

* Update codeowners
2025-08-06 13:48:23 -07:00
lbrdnk
e5b8670c6d Add MB_SYNC_LEAF_FIELDS_LIMIT setting (#61842)
* Add MB_MONGODB_FIELD_LIMIT setting

* Update tests

* Make the setting generic
2025-08-06 22:40:17 +02:00
lbrdnk
88b979623a Check data permissions of result metadata columns (#61740)
* Add result_metadata perms check to qp

* Check result metadata view data on card put

* Throw the exception

* Test

* Add perm check for ad-hoc referencing cards

* Docstrings

* Use seq

* Order of checks

* Apply suggestions from code review

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* Simplify into

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-08-06 22:11:10 +02:00
Maz Ameli
458913d017 Add table link to metadata page (#61764)
* add table link to metadata page

* Table

* Add a e2e test

* Add a e2e test

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-08-06 19:21:50 +00:00
John Swanson
d9373fa6d8 Include columns that are not specifically excluded (#61761)
When streaming data for a query, we were only including columns if a)
the viz settings for the column were completely empty, or if b) the viz
settings for the columns included specifically enabling that column.

The problem occurs most clearly for things like native SQL queries.

If you construct a query like

```
SELECT id FROM venues;
```

and then set the column viz settings to *something* non-empty (most easy
way: just hide the `id` column and then show it again), and then save
the card, then change the query to:

```
SELECT id, name FROM venues;
```

then if you download the CSV for this card (even after saving it!)
you'll get a result that only contains `id` and not `name`.

A few tests needed to change here because they were implicitly assuming
the old behavior, but I don't think that's entirely intentional. This
behavior was different than the behavior in the Metabase application
proper, where UI results would show all the columns (in the above
example, they'd immediately show `id` *and* `name`).
2025-08-06 10:20:08 -07:00
Alex Yarosh
34e884c47a docs: jwt docs (#61876)
* jwt edits

* Optimized 2 images, saved 188.8 KB (46.0% smaller)

* why are y'all 'waiting for the status to be reported'

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-08-06 16:59:46 +00:00
Timofey Kachalov
ee9d5d3832 feat(sdk): Add "SDK incompatibility with instance" banner (#61859) 2025-08-06 19:34:36 +04:00
Riley Thompson
230784e3fb Always set connection role for Redshift (#61869) 2025-08-06 15:16:03 +00:00
Phoomparin Mano
8119bc5c8c feat(sdk): add translation context and aria-label to embedding sdk settings (#61856) 2025-08-06 21:42:42 +07:00
Phoomparin Mano
94570c4c1b Add color reset button to embed flow (#61839) 2025-08-06 21:40:16 +07:00
Timofey Kachalov
aade35f0db refactor(sdk): Minor imports/code adjustments for Hosted Bundle (#61862) 2025-08-06 18:11:28 +04:00
Timofey Kachalov
289e00d760 refactor(sdk): Add styles for custom SDK spinner loader (#61864) 2025-08-06 13:25:25 +00:00
Jakub Chodorowicz
7428fee268 Prg-108-add-gem-icon-and-free-trial-cta-in-interactive-embedding (#61714)
* Create Upsell CTA component

* Replace pro labe with gem in embed upsell

* Create and use UpsellCta in Embedding Upsell

* Rebuiltd the logic for showing links and upsells in embedding modal

* Add UpsellCta tests

* Remove unneeded hook

Fix test and URL rendering for hosted

* Remove unneeded hook useInteractiveEmbeddingCta

* Fix test not running in target build (OSS)

* Fix embedded modal ee end premium cloud tests

* Add missing translation tag

* Use single upsellcta styling
2025-08-06 11:51:04 +02:00
Timofey Kachalov
ffad0df277 refactor(sdk): Prepare e2e code for Hosted Bundle (#61852) 2025-08-06 13:12:08 +04:00
Nicolò Maria Mezzopera
d86d74ba5f PR-envs and ci skip should work together (#61448)
* feat: promote uberjar as the single uberjar creation workflow

* chore: remove useless   reuse-existing-artifacts

* refactor: streamline PR environment workflow by removing wait_for_uberjar input and simplifying uberjar retrieval

* fix: ensure default editions are used if container info retrieval fails

* chore: don't build uberjar outside of run-tests

* fix: update uberjar artifact name to use the current SHA instead of PR head SHA

* fix: update uberjar artifact names to use PR head SHA when available

* fix: update uberjar workflow to simplify input parameters and improve conditional checks

* fix: add concurrency settings to uberjar workflow

* fix: update documentation condition in run-tests workflow

* fix: add default node version

* fix: update conditions for container info retrieval and containerization steps

* fix: update default node version to 22 in uberjar workflow

* Update .github/workflows/uberjar.yml

* Update .github/workflows/uberjar.yml

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-08-06 09:08:29 +00:00
Phoomparin Mano
141cff0fe8 Fix upsell button and auth links in embedding admin settings (#61802) 2025-08-06 15:21:14 +07:00
Timofey Kachalov
cc758a125d refactor(sdk): Convert webpack.embedding-sdk.config to rspack and prepare for Hosted Bundle (#61822) 2025-08-06 10:09:46 +04:00
Cam Saul
4b8d3a1dc8 Flaky test fix for metabase.queries.api.card-test/we-can-get-a-list-of-dashboards-a-card-appears-in (#61619)
* Flaky test fix for metabase.queries.api.card-test/we-can-get-a-list-of-dashboards-a-card-appears-in

* Fix formatting

* cljfmt

* Fix Kondo warning
2025-08-05 16:18:13 -07:00
Case Nelson
c9106f66f1 fix: handle arrays in sparksql (#61690) 2025-08-05 20:58:21 +00:00
Alexander Polyankin
efac2b8f96 [Release blocker] Revert fuzzy matching changes (#61828)
* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Revert fuzzy matching changes

* Test fixes
2025-08-05 15:55:38 -04:00
Phoomparin Mano
ab30c325db Rename embed-iframe route to embed-js (#61803) 2025-08-06 02:47:46 +07:00
Alexander Polyankin
d11ce55c79 [Release blocker] Revert join custom columns changes (#61827) 2025-08-05 15:19:32 -04:00
Cam Saul
81b5c133b2 Ensure we're actually using a cached metadata provider in tests (somewhat faster Lib/QP tests) (#61702)
* Ensure we're actually using a cached metadata provider in tests

* Remove profiling code

* Restore accidentally-deleted `native-query-snippet` fn

* Fix accidental edits

* Test fix 🔧

* Sort namespaces
2025-08-05 18:58:24 +00:00
Phoomparin Mano
673c5b93ed Add enable_embedding_simple to stats.clj (#61807) 2025-08-05 22:01:08 +07:00
Ngoc Khuat
44ec7bc393 [Action v2] Undo / Redo (#61677) 2025-08-05 13:24:50 +00:00
Timofey Kachalov
62b48d1795 refactor(sdk): Prepare src/metabase code for Hosted Bundle (#61801) 2025-08-05 15:25:26 +04:00
Timofey Kachalov
da35b08918 refactor(sdk): Add x-metabase-version header to BE responses (#61799) 2025-08-05 12:35:50 +04:00
Timofey Kachalov
4a56e706eb Migrate webpack.shared.config.js to rspack (#61796) 2025-08-05 12:34:24 +04:00
Phoomparin Mano
d8a03a312f Update copy from new iframe to Embedded Analytics JS in embed flow (#61788) 2025-08-05 01:13:01 +04:00
dpsutton
81f880637b bump hive to 4.1.0 (#61766)
solves:
https://github.com/metabase/metabase/security/code-scanning/305
https://github.com/metabase/metabase/security/code-scanning/304
https://github.com/metabase/metabase/security/code-scanning/301
https://github.com/metabase/metabase/security/code-scanning/302

does not solve:
https://github.com/metabase/metabase/security/code-scanning/490
2025-08-04 15:32:00 -05:00
Oleksandr Yakushev
9a6dd6456f [pivot] Implement optimized clj->js and use it when recalculating pivots on frontend (#61241) 2025-08-04 21:22:22 +03:00
Phoomparin Mano
698be3e9f7 Revert "feat(sdk): hide tables by default in embedding data picker if there a…" (#61792) 2025-08-04 22:17:36 +07:00
Phoomparin Mano
f232f68588 Cleanup stacked card background on embed flow preview (#61782) 2025-08-04 17:29:10 +07:00
Oleksandr Yakushev
75ef744af8 [m.u.performance] Make performance namespace cross-platform (#61159) 2025-08-02 02:05:40 +03:00
Phoomparin Mano
84e35e40da feat(sdk): hide tables by default in embedding data picker if there are more than 2 models (#61022)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
2025-08-01 21:27:33 +00:00
Riley Thompson
d3f48b79a5 Enable DB routing for Databricks (#61630) 2025-08-01 16:56:46 -04:00
Jeff Bruemmer
643695fc44 docs - update expressions list (#61727)
* date funcs

* summary
2025-08-01 15:43:19 -04:00
Jeff Bruemmer
fd29d268d3 docs - update time grouping example (#61752)
* Update time-grouping-parameters.md

* tags

* edit
2025-08-01 15:42:16 -04:00
dpsutton
1a14bd6eba submit init function, not results (#61733)
was blocking on startup
stacktrace below is representative. has a few other things like reveal
but shows that we get into a huge loop over all cards and you end up
waiting for the instance to be ready for a long time
```
	at metabase.lib.card$fn__77290$fn__77297.invoke(card.cljc:71)
	at metabase.lib.card$fn__77302$__GT_card_metadata_columns77301__77303$fn__77304.invoke(card.cljc:141)
	at clojure.core$mapv$fn__8569.invoke(core.clj:7059)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:418)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$mapv.invokeStatic(core.clj:7050)
	at clojure.core$mapv.invoke(core.clj:7050)
	at metabase.lib.card$fn__77302$__GT_card_metadata_columns77301__77303.invoke(card.cljc:141)
	at metabase.lib.card$fn__77302$fn__77308.invoke(card.cljc:120)
	at metabase.lib.card$fn__77316$card_cols_STAR_77315__77317.invoke(card.cljc:163)
	at metabase.lib.card$fn__77316$fn__77322.invoke(card.cljc:157)
	at metabase.lib.card$fn__77350$card_metadata_columns77349__77351.invoke(card.cljc:223)
	at metabase.lib.card$fn__77350$fn__77354.invoke(card.cljc:217)
	at metabase.lib.card$eval77367$_AMPERSAND_f__77368.invoke(card.cljc:257)
	at metabase.lib.card$eval77367$fn__77372.invoke(card.cljc:242)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777$fn__74778.invoke(calculation.cljc:524)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:523)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:516)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.field.resolution$fn__80775$resolve_in_card_returned_columns80774__80776.invoke(resolution.cljc:352)
	at metabase.lib.field.resolution$fn__80775$fn__80784.invoke(resolution.cljc:346)
	at metabase.lib.field.resolution$fn__80788$resolve_in_card_or_stage_metadata80787__80789.invoke(resolution.cljc:365)
	at metabase.lib.field.resolution$fn__80788$fn__80801.invoke(resolution.cljc:358)
	at metabase.lib.field.resolution$resolve_from_previous_stage_or_source_STAR_.invokeStatic(resolution.cljc:410)
	at metabase.lib.field.resolution$resolve_from_previous_stage_or_source_STAR_.invoke(resolution.cljc:390)
	at metabase.lib.field.resolution$fn__80844$resolve_from_previous_stage_or_source80843__80845.invoke(resolution.cljc:440)
	at metabase.lib.field.resolution$fn__80844$fn__80861.invoke(resolution.cljc:434)
	at metabase.lib.field.resolution$fn__80865$resolve_field_ref80864__80867.invoke(resolution.cljc:471)
	at metabase.lib.field.resolution$fn__80865$fn__80878.invoke(resolution.cljc:457)
	at metabase.lib.field$eval80922$_AMPERSAND_f__80923.invoke(field.cljc:62)
	at metabase.lib.field$eval80922$fn__80925.invoke(field.cljc:60)
	at clojure.lang.MultiFn.invoke(MultiFn.java:239)
	at metabase.lib.metadata.calculation$fn__74679$metadata74678__74680$fn__74681.invoke(calculation.cljc:287)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74679$metadata74678__74680.invoke(calculation.cljc:286)
	at metabase.lib.metadata.calculation$fn__74679$fn__74684.invoke(calculation.cljc:275)
	at metabase.lib.breakout$fn__80328$breakouts_metadata80327__80329$fn__80331.invoke(breakout.cljc:43)
	at clojure.core$mapv$fn__8569.invoke(core.clj:7059)
	at clojure.lang.PersistentVector.reduce(PersistentVector.java:418)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$mapv.invokeStatic(core.clj:7050)
	at clojure.core$mapv.invoke(core.clj:7050)
	at metabase.lib.breakout$fn__80328$breakouts_metadata80327__80329.invoke(breakout.cljc:42)
	at metabase.lib.breakout$fn__80328$fn__80334.invoke(breakout.cljc:35)
	at metabase.lib.stage$fn__81784$breakouts_columns81783__81785.invoke(stage.cljc:59)
	at metabase.lib.stage$fn__81784$fn__81787.invoke(stage.cljc:55)
	at metabase.lib.stage$fn__81843$summary_columns81842__81844.invoke(stage.cljc:92)
	at metabase.lib.stage$fn__81843$fn__81846.invoke(stage.cljc:86)
	at metabase.lib.stage$eval81986$_AMPERSAND_f__81988.invoke(stage.cljc:290)
	at metabase.lib.stage$eval81986$fn__81996.invoke(stage.cljc:283)
	at clojure.lang.MultiFn.invoke(MultiFn.java:244)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777$fn__74778.invoke(calculation.cljc:524)
	at metabase.lib.metadata.cache$fn__74548$do_with_cached_value74547__74549.invoke(cache.cljc:104)
	at metabase.lib.metadata.cache$fn__74548$fn__74555.invoke(cache.cljc:92)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:523)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:516)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:513)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.lib.metadata.calculation$fn__74776$returned_columns74775__74777.invoke(calculation.cljc:510)
	at metabase.lib.metadata.calculation$fn__74776$fn__74781.invoke(calculation.cljc:503)
	at metabase.queries.models.card$dataset_query__GT_dimensions.invokeStatic(card.clj:1270)
	at metabase.queries.models.card$dataset_query__GT_dimensions.invoke(card.clj:1262)
	at metabase.queries.models.card$extract_non_temporal_dimension_ids.invokeStatic(card.clj:1277)
	at metabase.queries.models.card$extract_non_temporal_dimension_ids.invoke(card.clj:1274)
	at metabase.search.ingestion$execute_function_attr.invokeStatic(ingestion.clj:68)
	at metabase.search.ingestion$execute_function_attr.invoke(ingestion.clj:63)
	at metabase.search.ingestion$execute_all_function_attrs$fn__131886.invoke(ingestion.clj:80)
	at clojure.lang.PersistentHashMap$NodeSeq.kvreduce(PersistentHashMap.java:1309)
	at clojure.lang.PersistentHashMap$BitmapIndexedNode.kvreduce(PersistentHashMap.java:804)
	at clojure.lang.PersistentHashMap$NodeSeq.kvreduce(PersistentHashMap.java:1314)
	at clojure.lang.PersistentHashMap$BitmapIndexedNode.kvreduce(PersistentHashMap.java:804)
	at clojure.lang.PersistentHashMap.kvreduce(PersistentHashMap.java:238)
	at clojure.core$fn__8559.invokeStatic(core.clj:6987)
	at clojure.core$fn__8559.invoke(core.clj:6967)
	at clojure.core.protocols$fn__8287$G__8282__8296.invoke(protocols.clj:174)
	at clojure.core$reduce_kv.invokeStatic(core.clj:6998)
	at clojure.core$reduce_kv.invoke(core.clj:6989)
	at metabase.search.ingestion$execute_all_function_attrs.invokeStatic(ingestion.clj:76)
	at metabase.search.ingestion$execute_all_function_attrs.invoke(ingestion.clj:73)
	at metabase.search.ingestion$__GT_document.invokeStatic(ingestion.clj:87)
	at metabase.search.ingestion$__GT_document.invoke(ingestion.clj:85)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at medley.core$distinct_by$fn__15232$fn__15233.invoke(core.cljc:290)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at clojure.core$completing$fn__8562.invoke(core.clj:7010)
	at clojure.core$map$fn__5952$fn__5953.invoke(core.clj:2759)
	at toucan2.pipeline$with_init$fn__51829.invoke(pipeline.clj:327)
	at clojure.core$completing$fn__8562.invoke(core.clj:7010)
	at toucan2.jdbc.result_set$reduce_result_set.invokeStatic(result_set.clj:156)
	at toucan2.jdbc.result_set$reduce_result_set.invoke(result_set.clj:125)
	at toucan2.jdbc.query$reduce_jdbc_query.invokeStatic(query.clj:51)
	at toucan2.jdbc.query$reduce_jdbc_query.invoke(query.clj:22)
	at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invokeStatic(pipeline.clj:19)
	at toucan2.jdbc.pipeline$transduce_execute_with_connection_primary_method_java_sql_Connection_default_default.invoke(pipeline.clj:9)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:15)
	at methodical.impl.combo.threaded$combine_methods_thread_last$fn__23165$combined_method_thread_last__23166.invoke(threaded.clj:64)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
	at toucan2.pipeline$transduce_execute$with_connection_STAR___51727.invoke(pipeline.clj:78)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invokeStatic(connection.clj:13)
	at toucan2.jdbc.connection$do_with_connection_primary_method_java_sql_Connection.invoke(connection.clj:11)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
	at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.pipeline$transduce_execute.invokeStatic(pipeline.clj:77)
	at toucan2.pipeline$transduce_execute.invoke(pipeline.clj:64)
	at clojure.lang.Var.invoke(Var.java:401)
	at toucan2.pipeline$transduce_compiled_query.invokeStatic(pipeline.clj:244)
	at toucan2.pipeline$transduce_compiled_query.invoke(pipeline.clj:240)
	at toucan2.pipeline$transduce_built_query.invokeStatic(pipeline.clj:252)
	at toucan2.pipeline$transduce_built_query.invoke(pipeline.clj:246)
	at toucan2.pipeline$transduce_query_primary_method_default.invokeStatic(pipeline.clj:272)
	at toucan2.pipeline$transduce_query_primary_method_default.invoke(pipeline.clj:269)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:15)
	at methodical.impl.combo.threaded$combine_methods_thread_last$fn__23165$combined_method_thread_last__23166.invoke(threaded.clj:64)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:65)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:216)
	at toucan2.pipeline$transduce_query_STAR_.invokeStatic(pipeline.clj:278)
	at toucan2.pipeline$transduce_query_STAR_.invoke(pipeline.clj:274)
	at toucan2.pipeline$transduce_with_model.invokeStatic(pipeline.clj:293)
	at toucan2.pipeline$transduce_with_model.invoke(pipeline.clj:280)
	at toucan2.pipeline$transduce_parsed.invokeStatic(pipeline.clj:309)
	at toucan2.pipeline$transduce_parsed.invoke(pipeline.clj:295)
	at clojure.lang.AFn.applyToHelper(AFn.java:160)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:669)
	at clojure.core$apply.invoke(core.clj:662)
	at toucan2.pipeline$reducible_fn$reify__51862.reduce(pipeline.clj:404)
	at clojure.core$transduce.invokeStatic(core.clj:7025)
	at clojure.core.Eduction.reduce(core.clj:7874)
	at clojure.core$reduce.invokeStatic(core.clj:6964)
	at clojure.core$reduce.invoke(core.clj:6947)
	at metabase.util$rconcat$reify__16182.coll_reduce(util.cljc:1188)
	at clojure.core$transduce.invokeStatic(core.clj:7026)
	at clojure.core.Eduction.reduce(core.clj:7874)
	at clojure.core$transduce.invokeStatic(core.clj:7025)
	at clojure.core$transduce.invokeStatic(core.clj:7021)
	at clojure.core$transduce.invoke(core.clj:7012)
	at metabase.search.appdb.index$index_docs_BANG_.invokeStatic(index.clj:279)
	at metabase.search.appdb.index$index_docs_BANG_.invoke(index.clj:275)
	at metabase.search.appdb.core$populate_index_BANG_.invokeStatic(core.clj:169)
	at metabase.search.appdb.core$populate_index_BANG_.invoke(core.clj:168)
	at metabase.search.appdb.core$eval132669$fn__132671.invoke(core.clj:182)
	at clojure.lang.MultiFn.invoke(MultiFn.java:234)
	at metabase.search.core$init_index_BANG_$iter__133794__133798$fn__133799.invoke(core.clj:91)
	at clojure.lang.LazySeq.force(LazySeq.java:50)
	at clojure.lang.LazySeq.realize(LazySeq.java:89)
	at clojure.lang.LazySeq.seq(LazySeq.java:106)
	at clojure.lang.RT.seq(RT.java:555)
	at clojure.core$seq__5488.invokeStatic(core.clj:139)
	at clojure.core.protocols$seq_reduce.invokeStatic(protocols.clj:24)
	at clojure.core.protocols$fn__8266.invokeStatic(protocols.clj:74)
	at clojure.core.protocols$fn__8266.invoke(protocols.clj:74)
	at clojure.core.protocols$fn__8207$G__8202__8220.invoke(protocols.clj:13)
	at clojure.core$reduce.invokeStatic(core.clj:6965)
	at clojure.core$reduce.invoke(core.clj:6947)
	at metabase.search.core$init_index_BANG_.invokeStatic(core.clj:88)
	at metabase.search.core$init_index_BANG_.doInvoke(core.clj:80)
	at clojure.lang.RestFn.invoke(RestFn.java:411)
	at metabase.search.task.search_index$init_BANG_$fn__173098.invoke(search_index.clj:38)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_$with_connection_STAR___126394$with_transaction_STAR___126395.invoke(cluster_lock.clj:61)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at metabase.app_db.connection$do_transaction$thunk__61025.invoke(connection.clj:145)
	at metabase.app_db.connection$do_transaction.invokeStatic(connection.clj:164)
	at metabase.app_db.connection$do_transaction.invoke(connection.clj:141)
	at metabase.app_db.connection$do_with_transaction_primary_method_java_sql_Connection.invokeStatic(connection.clj:201)
	at metabase.app_db.connection$do_with_transaction_primary_method_java_sql_Connection.invoke(connection.clj:174)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:13)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invokeStatic(connection.clj:249)
	at toucan2.connection$do_with_transaction_around_method_toucan2_connection_default.invoke(connection.clj:245)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:13)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:58)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:212)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_$with_connection_STAR___126394.invoke(cluster_lock.clj:53)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.connection$bind_current_connectable_fn$fn__51305.invoke(connection.clj:104)
	at toucan2.jdbc.connection$do_with_connection_primary_method_javax_sql_DataSource.invokeStatic(connection.clj:18)
	at toucan2.jdbc.connection$do_with_connection_primary_method_javax_sql_DataSource.invoke(connection.clj:15)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at metabase.app_db.connection$do_with_connection_primary_method_default.invokeStatic(connection.clj:132)
	at metabase.app_db.connection$do_with_connection_primary_method_default.invoke(connection.clj:130)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at toucan2.connection$do_with_connection_primary_method_.invokeStatic(connection.clj:204)
	at toucan2.connection$do_with_connection_primary_method_.invoke(connection.clj:194)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invokeStatic(connection.clj:118)
	at toucan2.connection$do_with_connection_around_method_toucan2_connection_default.invoke(connection.clj:106)
	at methodical.impl.combo.common$partial_STAR_$fn__22829.invoke(common.clj:12)
	at methodical.util.FnWithMeta.invoke(util.clj:46)
	at methodical.impl.standard$invoke_multifn.invokeStatic(standard.clj:55)
	at methodical.impl.standard$invoke_multifn.invoke(standard.clj:47)
	at methodical.impl.standard.StandardMultiFn.invoke(standard.clj:210)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_.invokeStatic(cluster_lock.clj:53)
	at metabase.app_db.cluster_lock$do_with_cluster_lock_STAR_.invoke(cluster_lock.clj:51)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407$do_with_cluster_lock_STAR__STAR___126409.invoke(cluster_lock.clj:78)
	at clojure.lang.AFn.applyToHelper(AFn.java:152)
	at clojure.lang.AFn.applyTo(AFn.java:144)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:662)
	at metabase.util.retry$decorate$fn$reify__126370.call(retry.clj:110)
	at io.github.resilience4j.retry.Retry.lambda$decorateCallable$5(Retry.java:306)
	at metabase.util.retry$decorate$fn__126369.doInvoke(retry.clj:111)
	at clojure.lang.RestFn.invoke(RestFn.java:400)
	at metabase.util.retry$fn__126375$make126374__126376$fn__126377.invoke(retry.clj:120)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407.invoke(cluster_lock.clj:82)
	at metabase.app_db.cluster_lock$fn__126406$fn__126412.invoke(cluster_lock.clj:63)
	at metabase.app_db.cluster_lock$fn__126406$do_with_cluster_lock126405__126407.invoke(cluster_lock.clj:75)
	at metabase.app_db.cluster_lock$fn__126406$fn__126412.invoke(cluster_lock.clj:63)
	at metabase.search.task.search_index$init_BANG_.invokeStatic(search_index.clj:37)
	at metabase.search.task.search_index$init_BANG_.invoke(search_index.clj:33)
	at metabase.search.task.search_index$eval173156$fn__173157.invoke(search_index.clj:46)
	at metabase.startup.core$run_startup_logic_BANG_$fn__173079.invoke(core.clj:30)
	at metabase.startup.core$run_startup_logic_BANG_.invokeStatic(core.clj:28)
	at metabase.startup.core$run_startup_logic_BANG_.invoke(core.clj:24)
	at metabase.core.core$init_BANG__STAR_.invokeStatic(core.clj:181)
	at metabase.core.core$init_BANG__STAR_.invoke(core.clj:117)
	at metabase.core.core$init_BANG_.invokeStatic(core.clj:194)
	at metabase.core.core$init_BANG_.invoke(core.clj:189)
	at dev$init_BANG_.invokeStatic(dev.clj:143)
	at dev$init_BANG_.invoke(dev.clj:139)
	at dev$start_BANG_.invokeStatic(dev.clj:180)
	at dev$start_BANG_.invoke(dev.clj:176)
	at dev$eval206099.invokeStatic(NO_SOURCE_FILE:1)
	at dev$eval206099.invoke(NO_SOURCE_FILE:1)
	at clojure.lang.Compiler.eval(Compiler.java:7739)
	at clojure.lang.Compiler.eval(Compiler.java:7729)
	at clojure.lang.Compiler.eval(Compiler.java:7694)
	at clojure.core$eval.invokeStatic(core.clj:3232)
	at clojure.core$eval.invoke(core.clj:3228)
	at vlaaad.reveal.repl$wrap_eval$fn__37945.invoke(repl.clj:90)
	at clojure.main$repl$read_eval_print__9248$fn__9251.invoke(main.clj:437)
	at clojure.main$repl$read_eval_print__9248.invoke(main.clj:437)
	at clojure.main$repl$fn__9257.invoke(main.clj:459)
	at clojure.main$repl.invokeStatic(main.clj:459)
	at clojure.main$repl.doInvoke(main.clj:368)
	at clojure.lang.RestFn.applyTo(RestFn.java:140)
	at clojure.core$apply.invokeStatic(core.clj:667)
	at clojure.core$apply.invoke(core.clj:662)
```
2025-08-01 14:25:50 -05:00
Jeff Bruemmer
debb945c57 link to intro page (#61744) 2025-08-01 19:22:18 +00:00
Phoomparin Mano
8d195dc6db Add note on useExistingUserSession's browser compatibility (#61663) 2025-08-02 02:00:22 +07:00
John Swanson
1eccdad5f4 Format scalar currencies correctly (#61664)
Previously we were treating all currency formatting as if we were in a
table, and only adding the currency symbol if `currency-in-header` were
explicitly set to `false` for the column.

When formatting a scalar value, though, we want to always add the
currency symbol inline (since there is no header in this case).

I found that `metabase.channel.render.body/format-cell` and
`metabase.formatter.core/format-number` were actually only used to
format *scalar* cells and *scalar* numbers (as opposed to cells in a
table), so I renamed them for a bit more clarity and added a new
optional argument, `scalar?`, to
`metabase.formatter.core/number-formatter`. When passed (and truthy) the
currency symbol will be splatted into the formatted number even if
`:currency-in-header` is not `false`.
2025-08-01 09:51:31 -07:00
Ryan Laurie
3f07958eae [ci run] Fix deprecated input (#61700)
* replaced deprecated Input with TextInput

* udpate a couple more things

---------

Co-authored-by: iamkabilash <iamkabilash@gmail.com>
2025-08-01 10:51:06 -06:00
Jeff Bruemmer
0947c6b604 docs - minor edits (#61735)
* minor edits

* Update docs/permissions/row-and-column-security.md

Co-authored-by: Alex Yarosh <alexandra@metabase.com>

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-08-01 16:47:09 +00:00
Jeff Bruemmer
e62c8f1fff docs - rename data sandboxing to row and column security (#61682) 2025-08-01 12:35:02 -04:00
John Swanson
efb70a343a do not throw on empty query for /search (#61615)
instead just pass `(not-empty q)` to the search subsystem, which will
convert it to `nil` if it's empty and pass it unchanged if it's not.

I still don't think this is probably the ideal user experience when you
navigate to `/search` but it's not an error at least.
2025-08-01 08:48:45 -07:00
John Swanson
6f34845c13 Fix zero measure count issue for pivot tables (#61565) 2025-08-01 08:23:26 -07:00
Riley Thompson
11f24779e2 Always set roles on connections (#61563)
* always set roles on connections

* add deps

* include sql-jdbc.execute

* kondo warn on reflection
2025-08-01 14:51:25 +00:00
Brad Anderson
086a00ab8d Fix: UXW-382 - Public Links menu item within sharing menu is too large (#61628)
* UXW-382 Updates "Public link" menu item for admins when public links aren't enabled so it doesn't look obviously broken

* UXW-382 Updates tests

* UXW-382 Updates "enable public links" menu item to be disabled per PR feedback

* UXW-382 Swaps core styles for mantine props per PR feedback
2025-08-01 10:50:58 -04:00
Nicolò Pretto
ed82963a86 chore(sdk): bump minimum react version to 18 (#61718) 2025-08-01 16:36:02 +02:00
Edward Paget
0fe24156a3 fix: issues generating valid urls for map tiles (#61634)
* fix: issues generating valid urls for map tiles

Fixes to issues generating map tiles, one is on x-ray dashboards we need
to check that we're not in a real dashboard and send an ad hoc tile
request.

Second if the field ref sent in the request has options we need to
remove the 'base-type' option because the type will be encoded as
something like test%2FFloat and the way Jetty decodes URLs before
parsing turns it into a '/' in a position a path separator cannot be:
https://github.com/jetty/jetty.project/issues/7713

* fixup! typeguard dashbaord id

* Update maps.cy.spec.js

* fixup! better handle null field opts
2025-08-01 08:40:27 -05:00
Riley Thompson
ad3ec1b797 Enable DB routing for snowflake (#61434) 2025-08-01 09:24:24 -04:00
Jeff Bruemmer
9276aaad2a docs - update generated docs (#61689)
* config template

* api docs

* env var docs
2025-08-01 09:21:27 -04:00
Timofey Kachalov
c69ef65bff feat(sdk): Use Mantine styles with CSS layer for the SDK (#61475) 2025-08-01 17:12:25 +04:00
Nicolò Pretto
87f36432ca allow setting the default cypress browser via env CYPRESS_BROWSER (#61652)
* allow setting the default cypress browser via env CYPRESS_BROWSER

* keep --browser have higher priority than the env
2025-08-01 12:19:34 +02:00
Nicolò Pretto
00ceb1aff2 remove references to ENTERPRISE_TOKEN (#61667)
* update docs that referenced old envs CYPRESS_ALL

* remove requirement on ENTERPRISE_TOKEN that's not needed anymore
2025-08-01 12:18:09 +02:00
Nicolò Pretto
b243e4e4d4 prepare the sdk workflow for 56 release (#61704) 2025-08-01 08:31:34 +00:00
Oleksandr Yakushev
7c2347fef6 [qp] Use metabase.util.performance/postwalk instead of regular clojure.walk (#60722) 2025-08-01 06:10:20 +00:00
Ryan Laurie
ab0ed63e26 update build info for v56 (#61676) 2025-07-31 20:18:24 -06:00
Ryan Laurie
d34ddd45c2 fix release notes preview action (#61671) 2025-07-31 20:18:16 -06:00
bryan
b07b86a367 enable cider middleware in dev-start (#61678)
Co-authored-by: Raimon Grau <raimonster@gmail.com>
2025-07-31 23:18:52 +00:00
Ryan Laurie
c4db9bf7fe fix native models test (#61697) 2025-07-31 22:20:33 +00:00
Cam Saul
d389949074 Re-implementation of metabase.driver.common.parameters.* that uses Lib (#61158)
* Re-implementation of `metabase.driver.common.parameters.*` that uses Lib

* Fix Kondo warnings

* Move tests that have nothing to do with drivers to QP

* Test fixes 🔧

* Test fixes 🔧

* Try simplifying the PR
2025-07-31 18:14:41 -04:00
bryan
0a9b808754 update jar-download to handle {v,}1.56.0-beta (#61696) 2025-07-31 22:11:21 +00:00
Riley Thompson
f1057b6420 Enable DB routing for Redshift (#61390)
* db routing for redshift

* simplify test

* dataset name multimethod

* small change

* use delayed defs

* add redshift ci routing env var

* small fix

* update dataset definitions

* change back to original data
2025-07-31 17:14:50 -04:00
Jakub Chodorowicz
28bf41bb17 Replace getStoreUrl usage with useStoreUrl (#61534)
* Replace getStoreUrl usage with useStoreUrl

* Refactor getStoreUrl

* Add harcoded default store URL (live store)
2025-07-31 15:09:31 -06:00
Oleksandr Yakushev
73bcc90a68 [pivot] Replace json-roundtrip with explicit type conversions (#61384) 2025-08-01 00:09:26 +03:00
Oleksandr Yakushev
74a6335bd3 [legacy-mbql] Optimize normalize-tokens (#60721) 2025-08-01 00:03:43 +03:00
Riley Thompson
fa3b11fcde Retry have-select-privilege? on error (#61236)
* feat: driver/do-with-resilient-connection

* feat: :keep-open? option to do-with-connection-with-options

* feat: attempt describe-database with resilient connection

* feat: execute jdbc query with retry conn

* test

* avoid recursive issues

* simplify

* changelog

* type hint

* force local conn, so the connection being closed won't close outer unrealized result sets

* working test

* more test

* opts

* style

* add test for connection options

* notes

* fix test

* docstring

* Update src/metabase/driver/sql_jdbc/execute.clj

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* logs

* better logs

* try to close conn when it's no longer valid

* pull out logic to is-conn-open

* is-conn-open? test

* clarify

* Update docs/developers-guide/driver-changelog.md

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* update version

* chore: move tests to right namespace

* retry have select privilege on error

* add test

* improve test

* remove let

* separate connection for each test

* clean up test

* try druid jdbc ci fix

* close connection during test

* use do with resilient connection in test for druid

* formatting

* always set role if supported

* Fix clickhouse and sqlserver

* impersonation test

* use normal-driver-select

* address comments

* kondo

* remove debug

---------

Co-authored-by: Nicola Mometto <nicola.mometto@metabase.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-07-31 19:38:56 +00:00
Denis Berezin
f8f5e20c1f UXW-381 Fix collections bulk action buttons UI (#61640) 2025-07-31 19:06:57 +03:00
Alex Yarosh
06712c46e5 Update database-routing.md (#61672) 2025-07-31 15:39:59 +00:00
Brad Anderson
f9d74d1f3b Fix: UXW-28 When deleting a tab with questions saved to the dashboard, no option offered to keep and move those questions (#61526)
* UXW-28 Adds confirmation modal when deleting a tab that contains dashboard-only cards

* UXW-28 Makes confirmation modal smarter; uses short version if all questions on a tab are dashboard questions, lists affected questions if it's a mix

* UXW-28 Adds tests
2025-07-31 10:51:35 -04:00
Brad Anderson
1dffd98bd7 UXW-314 Fix action icon inconsistencies (#61639) 2025-07-31 08:48:04 -06:00
Nicola Mometto
909354fe89 Attempt to reconnect during select probing if connection is closed (#60857)
* feat: driver/do-with-resilient-connection

* feat: :keep-open? option to do-with-connection-with-options

* feat: attempt describe-database with resilient connection

* feat: execute jdbc query with retry conn

* test

* avoid recursive issues

* simplify

* changelog

* type hint

* force local conn, so the connection being closed won't close outer unrealized result sets

* working test

* more test

* opts

* style

* add test for connection options

* notes

* fix test

* docstring

* Update src/metabase/driver/sql_jdbc/execute.clj

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* logs

* better logs

* try to close conn when it's no longer valid

* pull out logic to is-conn-open

* is-conn-open? test

* clarify

* Update docs/developers-guide/driver-changelog.md

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>

* update version

* chore: move tests to right namespace

* impersonation test

* use normal-driver-select

* trigger CI

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-07-31 15:19:49 +01:00
Edward Paget
944ca02530 chore: remove stray #p (#61665)
Not sure why kondo didn't get this.
2025-07-31 09:08:50 -05:00
Vamsi Peri
a2b720a743 Delete .github/workflows/claude.yml (#61666) 2025-07-31 13:27:43 +00:00
eliotmetabase
3f19d40ca1 Temporary change to fix CI, will update modules properly (#61662) 2025-07-31 13:05:34 +00:00
Phoomparin Mano
e357c4f0db Design cleanup for embedding sdk settings page (#61653) 2025-07-31 19:57:52 +07:00
Timofey Kachalov
8563b74b89 Remove circular references in SDK package (#61657) 2025-07-31 16:16:13 +04:00
Nicolò Pretto
6558cca6a4 feat(simple-embed): parse attributes with json5 to be more permissive… (#61648)
* feat(simple-embed): parse attributes with json5 to be more permissive with quotes

* Update package.json

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>

* fix tests

* Apply suggestion from @heypoom

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-31 11:57:30 +00:00
Phoomparin Mano
435e905ffd Hide Embed menu from "New" button if the user is not an admin (#61658) 2025-07-31 18:39:58 +07:00
Oleksandr Solovyov
3063577208 update snowflake's commons-lang3 to clear out security issue (#61656) 2025-07-31 13:38:27 +02:00
Timofey Kachalov
1c6c3681a8 Add backend-sources as triggers to SDK compatibility tests (#61650) 2025-07-31 14:28:48 +04:00
Chris Truter
84f0a92394 Assign correct MB version metadata to data-editing functions (#61647) 2025-07-31 09:31:04 +00:00
Chris Truter
9019aab71e BE support for Table Data Editing (#61490)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2025-07-31 08:34:17 +00:00
Cam Saul
abdfe5062c Faster field ref resolution (#61529)
* Remove debugging stuff

* 14 failures, 1 error.

* 10 failures, 1 error.

* 10 failures, 0 errors.

* Better log messages

* Faster field ref resolution

* Test fixes 🔧

* Some test fixes 🔧

* Remove resolve-joined-fields middleware

* Fix lib.underlying calculation of fields with join aliases

* Fix busted pivot tests

* Remove unused fn

* More resolution fixes

* drill-thru use vars so we can get updated fns in the REPL

* Consolidate the lib metadata => legacy metadata functions

* Add a pile of additional tests

* Migrate the `resolve-joined-fields` middleware (#39884)

* Support automatically removing duplicate refs in `:fields` and `:breakouts` during normalization

* More cleanup and extra tests 🔧

* Add ::mbql.s/OrderBys

* Mess with logging in resolution even more

* Order bys should be distinct ignoring keys like :base-type or namespaced keys

* I have fixed #60587

* One last round of test fixes??

* Test fix

* Code cleanup

* Fix test failures 🔧

* MongoDB test fix

* Fix Oracle test 🔧

* MongoDB test fix 🔧

* cljfmt

* e2e test fix?

* Test fix 🔧

* Less noisy logging

* Improve field resolution for implicit joins; PR feedback (part 1)

* PR feedback (part 2) and extra dox
2025-07-30 23:35:25 +00:00
eliotmetabase
adefc0f0b7 Create UX West, remove Admin Webapp and Dashviz (#61644) 2025-07-30 23:34:58 +00:00
dpsutton
fadfd67275 Test drivers on folder changes (#61633)
* Run tests if files in lib/drivers/qp are changes

check src/metabase/lib, src/metabase/query_processor, modules/drivers

we key off of team label but this is hopefully close enough to what we
really want

* run an action linter

```
❯ actionlint /Users/dan/projects/work/metabase/.github/workflows/drivers.yml
.github/workflows/drivers.yml:440:71: property "exclude-tag" is not defined in object type {name: string; test-args: string} [expression]
.github/workflows/drivers.yml:537:15: description is required in metadata of "Wait for localhost port to be ready" action at "/Users/dan/projects/work/metabase/.github/actions/await-port/action.yml" [action]
    |
537 |       - uses: ./.github/actions/await-port
    |               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
.github/workflows/drivers.yml:587:13: description is required in metadata of "Test database driver" action at "/Users/dan/projects/work/metabase/.github/actions/test-driver/action.yml" [action]
    |
587 |       uses: ./.github/actions/test-driver
    |             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.github/workflows/drivers.yml:743:71: property "exclude-tag" is not defined in object type {name: string; test-args: string} [expression]
```

acitonlint seems pretty nice

not fixing the exclude-tag since that seems to work just fine

* fix syntax

* fetch base branch for file checks

to see if we changed files, need the base

* indentation is fun. super fast iteration

* resequence if before run
2025-07-30 18:28:38 -05:00
dpsutton
a204791f86 run third tier on devex team label (#61577)
* run third tier on devex team label

* empty to poke CI

* make prepare-statement private

probably good for this to be private either way, but this is done now to
kick CI and run tests that aren't running in CI

* close single quote
2025-07-30 17:09:57 -05:00
Edward Paget
4e7f0f28d3 fix: snyk set org and repo for open source limits (#61605) 2025-07-30 15:56:54 -05:00
John Swanson
a15d4122f2 Don't try to update setting as non-admin (#61567)
We're using a setting as a half-baked way to track whether we've ever
created a non-table chart. We do this regardless of whether you're an
admin or not, but the endpoint responds with a 403 if you're not an
admin.

Honestly motivation here was fixing [UXW-152: 403 thrown for non-admins
when viewing question re:
non-table-chart-generated](https://linear.app/metabase/issue/UXW-152/403-thrown-for-non-admins-when-viewing-question-re-non-table-chart)
but it feels a little silly. But... it's not *completely* unreasonable.
2025-07-30 20:47:37 +00:00
Case Nelson
8bc377369b refactor: drop with-temp from field-ref-repro tests (#61566) 2025-07-30 16:23:42 -04:00
Uladzimir Havenchyk
2ff3bb736f deps: update deps that use form-data to the fixed versions (#61582)
* deps: update deps that use form-data to the fixed versions

* downgrade jsdom
2025-07-30 20:06:09 +00:00
Uladzimir Havenchyk
badbd28565 deps: upgrade on-headers dep (#61589) 2025-07-30 20:05:11 +00:00
Nathan Voxland
c45c500628 Check for dev namespace better (#61610) 2025-07-30 14:46:08 -05:00
Uladzimir Havenchyk
a95c69a0b3 deps(release): update slack api and form-data packages (#61584) 2025-07-30 22:32:48 +03:00
Case Nelson
1319841229 dev: add the ability to run native ddl as part of dataset definitions (#61343)
* dev: add the ability to run native ddl as part of dataset definitions

* Fixing tests

* Fix kondo

* Fix tests and kondo

* Fix clickhouse tests

* Fix another clickhouse test

* Fix bigquery test

* Fix bigquery test

* Trigger Build
2025-07-30 13:24:53 -06:00
Edward Paget
e0bacfea5e feat: update group mapping text for jwt behavior (#61273)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* feat: make jwt group attribute admin configurable

* feat: update group mapping text for jwt behavior
2025-07-30 19:17:41 +00:00
Rodrigo López Dato
987ed5d7da Typo (#61624) 2025-07-30 16:01:04 -03:00
Nicolò Pretto
431afb660b feat(new-embed): log an error when the parsing of a json attribute fails (#61617)
* feat(new-embed): log an error when the parsing of a json attribute fails

* Update enterprise/frontend/src/metabase-enterprise/embedding_iframe_sdk/webcomponents.ts

Co-authored-by: Phoomparin Mano <poom@metabase.com>

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-30 20:51:21 +02:00
Edward Paget
b11f0905f3 fix: allow scalar user-attributes (#61613)
* fix: allow scalar user-attributes

Only drop collections which cannot be converted to strings when
generating database queries.

* fixup! remove unused namespace

* fixup! use keep to retain false booleans
2025-07-30 18:42:56 +00:00
Phoomparin Mano
7eee4b5da1 docs(sdk): missing documentation for question components (#61616) 2025-07-30 18:27:12 +00:00
John Swanson
4bef26a524 Remove quotes around UUIDs in XLSX downloads (#61614)
I'm ignoring `styles` and `typed-styles` here just like the `Object`
implementation or the `String` implementation.
2025-07-30 12:31:31 -05:00
Phoomparin Mano
9edd0db967 Embed preview for simple embedding fails on production due to localhost checks (#61606) 2025-07-30 23:41:37 +07:00
Sébastien
f51780142f feat(sdk): download button is now in an always visible ... menu (#61556)
* Closes EMB-669: download button is now in an always visible ... menu

* renamed file and component

* Update Loki Snapshots

* fixed unit tests

* e2e

* e2e

* e2e

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-30 17:11:42 +02:00
Ryan Laurie
98ce261480 don't pass empty strings to question create API (#61467)
* don't pass empty strings to question create API

* add unit tests

* handle null

* even better
2025-07-30 15:10:21 +00:00
Phoomparin Mano
f7e1511dcd Update settings page and use Embedded Analytics JS as the public name (#61597) 2025-07-30 21:50:41 +07:00
Edward Paget
f1d46ecf36 feat: make jwt group attribute admin configurable (#61234)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* feat: make jwt group attribute admin configurable
2025-07-30 14:43:20 +00:00
Ngoc Khuat
f93123f2a2 Fix alert with goal archived even though goal is not met (#61586) 2025-07-30 13:37:53 +00:00
Oleksandr Yakushev
6a73a95940 [dev] Add devtools-to-flamegraph script (#61157) 2025-07-30 15:42:05 +03:00
Phoomparin Mano
40d897d7f1 Add the Beta badge to "New > Embed" menu (#61593) 2025-07-30 19:03:41 +07:00
Oleksandr Solovyov
89a7f3c1b6 update nimbus-jose-jwt (#61581) 2025-07-30 11:17:02 +00:00
Phoomparin Mano
eb671b92ab Check for simple embedding's enabled settings and token feature (#61590) 2025-07-30 17:51:01 +07:00
Rodrigo López Dato
aa0cdb546d Fix empty latest version (#61578) 2025-07-30 00:43:01 -04:00
Nathan Voxland
8132b400d2 /api/dashboard/save should use the submitter's id as creator_id (#61524) 2025-07-29 17:33:38 -05:00
Dennis Schridde
8c80f88e30 Fix race condition of ee-extra release trigger (#61559)
The workflow in the `metabase-ee-extra` repository could run before the
container image tags were created by the workflow in the `metabase`
repository, causing the former to fail.  Fix by making the image push
an explicit dependency of the ee-extra trigger.
2025-07-29 23:46:31 +02:00
Nathan Voxland
c004ea2d46 Created prototype API for dev work (#61473) 2025-07-29 16:36:13 -05:00
Luiz Arakaki
78adcf7380 Rename sandboxing row column security (#58369)
Rename sandboxing to row and column security
2025-07-29 17:15:37 -03:00
dk-gervais
7bc29f3f9a Update community-drivers.md (#61431)
Add the InterSystems IRIS Metabase driver to the list of Community Drivers
2025-07-29 15:59:32 -04:00
Edward Paget
d7cf38d3cf fix: simplify sandbox permissions management (#61542)
This works by just totally removing the permission grants created by
sandboxes. Instead we use the `gtapped-table` flag added by the
sandboxing middleware to add just the gtapped-table itself to set of
necessary table create-query permissions and exclude any joined tables
from being added to this set.

If those tables are included elsewhere in the query (not the part
created by the sandbox), they will be added to the set of tables to
check normally and the query will be blocked if the user doesn't have
query-builder perms.
2025-07-29 14:22:49 -05:00
Edward Paget
72bca32bcd fix: new child collections use parent's namespace (#60202)
Child collections are automatically created with the same namespace as
their parent collection. Since we enforce a validation that this must be
true it seems simpler for api clients to have this value set for them
rather than requiring them to supply the namespace attribute (though it
still remains optional to pass one.)
2025-07-29 14:02:29 -05:00
Edward Paget
14b2815113 feat: auto assign jwt users to groups by name (#61221)
* fix: filter-out non-string attributes

We expected login_attributes to only be strings. When they are created
through SAML or JWT logins we don't actually enforce this, so this
filters out non-string attributes printing a warning message if they are
passed for these login types.

* feat: auto assign jwt users to groups by name

When group sync is turned on and there are no group mappings defined for
the jwt integration.

* fixup! remove tenant user group

* fixup! correct bad merge

* fixup! remove some tenant_ids in tests

* fixup! more test fixes

* Update common.clj
2025-07-29 14:01:50 -05:00
Phoomparin Mano
9b0241aa11 Rename feature token name from embedding_iframe_sdk to embedding_simple (#61548) 2025-07-30 01:38:15 +07:00
Edward Paget
13a851f3c1 feat: add audit log events for groups (#60946)
As part of the tenanting project we want to emit audit events when users
join/leave tenant groups (or these groups are otherwise modified).
2025-07-29 13:01:45 -05:00
Jeff Bruemmer
9dcd19054e docs - custom smtp server (#61549)
* custom smtp server

* notes

* edits
2025-07-29 13:48:36 -04:00
Nicolò Pretto
0c64aaa4a7 custom elements api for new simple embedding (#60646)
* wip

* experiment of callback to see if it works on vue with .callback={}

* basic e2e test for dashboard

* more tests and cleanup

* remove my-app playground

* rm unused file

* use custom elements for the preview

* support for async and defer, defaulting to defer

* clean up custom elements code

* rename drills props

* Revert "experiment of callback to see if it works on vue with .callback={}"

This reverts commit 89a38dca47.

* fix theme not being restored from persisted settings

* fix: load script  for preview from instance url, make iframe loaded data
attribute work

* change the snippet to use new defer syntax

* support for exploration with question-id=new

* cleanup

* fix types

* Revert "fix types"

This reverts commit bbc8eb8b59.

* Revert "support for exploration with question-id=new"

This reverts commit 4c3f041629.

* reimplement support for exploration

* fix parameters conditional rendering

* fix linting issues

* fix embed code snippet

* fix(new-embed): allow multiple questions/dashboards on the same page

* test for multiple questions

* add note about theme

* feat(sdk): expose the title prop in StaticQuestion (#61001)

* attempot to make tests more stable

* fix types

* maybe fix tests?

* test for ci

* put back support for is-save-enabled

* H.getIframeBody -> H.getSimpleEmbedIframeContent as it should be less flaky

* restore logic

* fix exploration not working in test

* moved comment to the correct place

* potential fix for handleMessage, ignore messages from other iframes

* use question for exploration templates

* fix type errors

* skip flaky "persists default and hidden parameters"

* fix template: exploration in embed flow

* always enable embedding-simple on embed flow tests

* refactor the custom elements tests to use the generic helpers

* fix tests :fingercrossed:

* default title to true

* update helper to grab the first 37.65

* default drills to true

* we're now showing the title by default

---------

Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-29 18:57:04 +02:00
Nicola Mometto
ef8bc2ea06 reassign sem to querying (#61551) 2025-07-29 16:41:08 +00:00
Jacob Joseph
915a78f13a Update upgrading-metabase.md (#61552)
note about running on JAR with higher version.
2025-07-29 15:40:10 +00:00
Ryan Laurie
7427caa8d0 Remove release/update channel selection (#61369)
* remove release/update channel selection

* 😁

* white space is dark space in dark mode

* obey the linter

* update comment
2025-07-29 07:54:32 -06:00
Phoomparin Mano
35bc7c8b9a Fix flaky tests for simple embedding due to toasts blocking the next button (#61541) 2025-07-29 20:39:46 +07:00
Nick Fitzpatrick
ff36018fb9 Add includeDashboardQuestions to the useAvailableData check (#61507)
* Add includeDashboardQuestions to the useAvailableData check

* fix spelling
2025-07-29 09:04:10 -03:00
Nicola Mometto
b7d5408300 move me and libor to metabot (#61536) 2025-07-29 13:00:00 +01:00
Sébastien
7bc79ed0a5 Added 'hide' button to SDK problem banner (#61532) 2025-07-29 12:34:49 +02:00
Phoomparin Mano
4e87da201c Auto-enable simple embedding in embed flow instead of react sdk (#61463)
Co-authored-by: Roman Abdulmanov <roman@metabase.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-07-29 16:44:33 +07:00
github-automation-metabase
ea826ef62b Bump net.thisptr/jackson-jq from 1.3.0 to 1.4.0 (#61483)
Inspect dependency changes here:

Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-29 08:23:27 +00:00
Cam Saul
1270cf7271 [Lib] Remove idents part 6 (#61511) 2025-07-28 18:37:54 -07:00
Cam Saul
fc23270381 [Release blocker fix] Correctly handle remapping inside joins (#61442)
* Do not add new extra empty stages when converting a join from legacy

* Update gitignore

* Simplified fix for #60444

* Fix QUE-1607

* Test fix 🔧

* Fix QUE-1621

* Additional tests.

* Test fix 🔧

* Remove dead code -- schemas for idents in legacy MBQL schema

* Test fix 🔧

* Fix QUE-1623

* Test fix 🔧

* Fix failing tests

* Test fixes 🔧

* Make sure join metadata goes in the right place

* Additional tests

* Make sure join metadata goes in the right place

* Less verbose logging

* Test fixes 🔧

* Some extra tests 🔧

* Another test fix 🔧

* Remove unused export

* Cleanup

* Code cleanup

* Update tests 🔧

* test fixes

* Improve/fix metadata calculation

* Test fixes 🔧

* Update tests

* Test fix 🔧

* Test fixes 🔧

* Test fix 🔧

* Test fixes 🔧

* PR feedback

* Test fix 🔧
2025-07-29 01:30:50 +00:00
Cam Saul
1d5a79395d Remove 'fix bad references' middleware (#61472) 2025-07-28 20:21:23 -04:00
Fraser
cc3ddf8359 Add content translation to multi-autocomplete (#61263) 2025-07-29 09:40:28 +12:00
Jeff Bruemmer
5b5c5e7298 docs - time grouping parameters for sql queries (#60951) 2025-07-28 17:20:42 -04:00
bryan
0b3df70817 force ref checkout for pull_request type trigger (#61514) 2025-07-28 12:27:36 -06:00
Jeff Bruemmer
5e7f3e9467 docs - metadata editing (#61501) 2025-07-28 14:04:32 -04:00
Edward Paget
ffb583c99e feat: separate jwt-set attributes from manual-set (#61458)
* allow tenant attributes CRUD (#60347)

wip merge user and tenant attributes

WIP use new api

Split Mapping Editor

types fixed

so much unit testing

handle null cases

update tests

update a couple more e2e tests

less silly test

make things nicer

invalidate user cache on tenant update

* feat: separate jwt-set attributes from manual-set

* fixup! typescript stuff

* feat: restore structrue-attributes merging

Co-Authored-by: Dan Sutton <dan@metabase.com>

* feat: use merged attributes in routing/sandbox/etc

Co-Authored-By: John Swanson <john.swanson@metabase.com>

* fixup! move group manager test to ee

* fixup! kondo

* fixup! modal spec

* fixup! cypress tests

* fixup! migration timestamp

* fixup! one more cherry pick oopsie

* fixup! sandboxing cypress helper fixes

* fixup! more cypress updates

* fixup! remove eslint directive

* fixup! remove 2-arity router-dbor-id->destination-db-id

All the places it was called with 2-arity were explicitly passing in
@api/current-user anyway

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Dan Sutton <dan@metabase.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
2025-07-28 16:50:15 +00:00
Edward Paget
be8e6611c3 fix: handle headerless translations csv (#61025)
* fix: handle headerless translations csv

* fixup! PR feedback

Also fixes an issue with error line number reporting without headers

* feat: allow csv headers to be in any order

* fixup! error reporting test
2025-07-28 16:31:29 +00:00
Edward Paget
f182885389 fix: run each snyk project individually (#61430)
* fix: remove categories on push

* fix: run each project individually

* fix: run jobs in parallel with pom caching

* fixup! dry it up

* Update snyk.yml
2025-07-28 11:04:40 -05:00
Edward Paget
3bb4d5e74d chore: add more query permission test scenarios (#61095)
* chore: test deeply nested cards with mixed perms

* chore: test custom expressions and aggregations

* chore: add more tests for blocks and joins

* fixup! whitespace

* fixup! remove confusing comments
2025-07-28 15:17:23 +00:00
Ryan Laurie
17bea4176a Update diagnostic info instructions (#61504) 2025-07-28 08:59:24 -06:00
Aleksandr Lesnenko
e22ab60e01 allow hide if no results setting in visualizer (#61471) 2025-07-28 11:53:25 -03:00
Oleksandr Solovyov
04c1d21645 welcome everyone (#61316) 2025-07-28 17:07:40 +03:00
Chris Truter
e446ba2c3d Allow "blank" search for fieldvalues (#61497) 2025-07-28 14:07:13 +00:00
Oleksandr Solovyov
93390d9f57 upgrade liquibase and postgres (#59774)
---------

Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-07-28 08:39:24 -05:00
Brad Anderson
29f56b541f UXW-35 Fixes #56249 in a way that still preserves the fix for #51611 (#61462) 2025-07-28 09:33:49 -04:00
Kamil Mielnik
d786ffbff8 SEM-527 Table picker item text overflows (#61444)
* Bring the effect back

* Add a comment
2025-07-28 16:25:08 +07:00
Roman Abdulmanov
58cfd55861 Updated team.json (#61488) 2025-07-28 09:58:19 +01:00
Phoomparin Mano
6625097d66 Update the embedding sdk admin settings to add simple embedding toggle (#61392)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-28 10:24:44 +02:00
Braden Shepherdson
ef21542b10 [MBQL Lib] Use stubs for cards and metrics in lib cache keys (#61386)
Fixes #61253.

Here's the breakdown of the issue, since it's subtle:
- These objects can contain some vanilla JS objects which in embedding
  contexts can be `Object.preventExtensions()`'d.
  - Eg. the `:visualization-settings` on a card or metric.
- `lib.metadata.cache` uses these objects as part of the cache key.
- Those become the keys of a CLJS map, which uses `cljs.core/hash`
- JS objects and arrays have pointer equality (`identical?` or `===`)
  semantics.
- The default `cljs.core.IHash/-hash` uses `goog.getUid(obj)`.
- That subtly mutates objects, adding a non-`enumerable`
  `closure_uid_123456789` property with an arbitrary sequence number.
- That's adding a property, which is a violation if
  `Object.preventExtensions()` (or `Object.freeze()`) has been used.
    - That silently does nothing by default, but throws in strict mode.

This PR modifies the cache key logic (which already has special handling
for `:lib/metadata`) to replace `:lib/type :metadata/card` and
`:metadata/metric` maps with a stub like `[:metric/card 123]`.
2025-07-28 07:43:18 +00:00
github-automation-metabase
645b55cfaf Bump commons-codec/commons-codec from 1.18.0 to 1.19.0 (#61482)
Inspect dependency changes here: https://github.com/apache/commons-codec/compare/commons-codec-1.18.0-RC1...commons-codec-1.19.0-RC1
2025-07-28 07:13:25 +00:00
Uladzimir Havenchyk
351fdc90cf chore: reduce usage of moment-timezone (#61388)
* drop unused redux functions

* drop time parsing in event cards

* replace moment types with dayjs

* use dayjs for tz guessing

* drop moment from a hook

* drop unused time functions
2025-07-28 06:02:59 +00:00
Fraser
05e78aae4a Use H helpers insteaed of commands cypress (#61403)
* Use H helpers insteaed of commands cypress
2025-07-28 09:11:50 +12:00
Fraser
b0b8348dad Remove flaky tag from content translation tests (#61439) 2025-07-28 09:11:36 +12:00
Cam Saul
831fb413cc [Lib] Misc metadata calculation and conversion bugfixes (#61437)
* Do not add new extra empty stages when converting a join from legacy

* Update gitignore

* Fix QUE-1607

* Test fix 🔧

* Fix QUE-1621

* Additional tests.

* Test fix 🔧

* Remove dead code -- schemas for idents in legacy MBQL schema

* Test fix 🔧

* Fix QUE-1623

* Test fix 🔧
2025-07-26 04:10:14 +00:00
bryan
aab42da74c remove unused dependency (#61374) 2025-07-25 21:38:12 +00:00
bryan
1dc85bcbae run known fixtures ahead of running tests (#61461) 2025-07-25 21:34:55 +00:00
Edward Paget
5e79cee71f fix: improve db drop down perf by prefiltering (#60652) 2025-07-25 15:48:09 -05:00
github-automation-metabase
23d194ca63 Bump io.github.camsaul/toucan2 from 1.0.565 to 1.0.566 (#59909)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-25 20:40:19 +00:00
Edward Paget
1cc4b87479 fix: mysql failure in saml setting test (#61460) 2025-07-25 18:40:18 +00:00
Phoomparin Mano
61d8979597 Update CORS and SSO handler to allow simple embedding client header (#61416) 2025-07-26 01:09:23 +07:00
Phoomparin Mano
206f7eaccb feat(sdk): expose the title prop in StaticQuestion (#61001) 2025-07-25 23:06:56 +07:00
Sébastien
832e2b7ac5 Viz 1323 visualizer cant combine single series chart and breakout (#61216)
* Closes VIZ-1322 VIZ-1323 looser compatibility

* fixup

* fixup

* fixed tests

* removed commented out blocks

* cleanup

* fixed unit test

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-07-25 17:33:09 +02:00
Chris Truter
dc973f0cb8 Add test coverage for search indexing during deserialization (#61047)
The test gives a bit of false confidence, as it passed before we added the forced re-indexing at the end of the import.

We probably want a way to keep the transaction open until after the ingestor has processed the messages from the toucan hooks... but that sounds quite invasive and brittle to pull off.
2025-07-25 15:14:40 +00:00
Edward Paget
08f7daa02a fix: reject dictionary locales not defined by mb (#60955)
If a locale is not defined for metabase we should not allow
content-translation dictionaries to uploaded with it. Since these
locales can't be used anyway it results in a confusing user experience.
2025-07-25 15:04:23 +00:00
Oisin Coveney
f2b8b44d48 Convert index.js/jsx to index.ts/tsx (#61373) 2025-07-25 14:30:19 +00:00
Phoomparin Mano
9d3ed0c9f2 Add defsetting and update embedding card in admin setting (#61292)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-25 21:01:05 +07:00
Oisin Coveney
0d14cb4aac Revert "Convert DashboardGrid to a functional component (#61364)" (#61449)
This reverts commit 647058ec89.
2025-07-25 13:56:19 +00:00
Oisin Coveney
647058ec89 Convert DashboardGrid to a functional component (#61364)
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-25 14:21:03 +03:00
Oisin Coveney
f58709dc20 Change InteractiveQuestion stories to SdkQuestion (#61445) 2025-07-25 13:52:36 +03:00
Phoomparin Mano
457cde39db Show simple embedding legal disclaimer and auto-enable embedding (#61375)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-07-25 17:51:45 +07:00
github-automation-metabase
3b028ee825 Bump net.snowflake/snowflake-jdbc-thin from 3.24.2 to 3.25.1 (#60910)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-25 09:14:46 +00:00
Fraser
c22ec1ebbd Remove waits from map e2e test (#61395) 2025-07-25 08:21:41 +12:00
Luis Paolini
d46d9d4dc9 Allow a width param for preview_png exporting (#61348)
* Allow a width param for exporting

* Fix linter
2025-07-24 17:20:25 -03:00
Jeff Bruemmer
08cd4c5d37 docs - user-generated content translation (#61102) 2025-07-24 18:48:15 +00:00
Tyler Plude
99a91de1b4 VIZ-1202 - Visualizer compatibility BE search filters (#60912)
* Populate search index col of non temporal dimension ids using clojure fn

* Add non_temporal_dim_ids filter param to search request

* fix kondo

* Add stub impl of new filter to in-place

* Add metadata provider cache

* Adding has-temporal-dim filter; fix tests

* fix lint

* Fix merge

* Hookup frontend to proper BE search filters; remove deprecated impl of has-temporal-dimensions

* Fix kondo

* Fix lingering refs to has-temporal-dimensions

* Fix lingering refs to has-temporal-dimensions

* fix test

* Fix test

* Remove FE compatibility code that was ported to BE; fix typing of partition helper

* Add helper for parsing non-temporal-dim-ids endpoint param; fix the conditional in FE

* remove debug let

* Add pr ref to comment

* Include dimension filter params in request only if cartesian

* remove specs that depended on checkDimensionCompatibilityForCartesianCharts

* PR feedback

* use existing dataset query transform

* Optimized 1 images, saved 76.0 KB (48.2% smaller)

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-24 11:38:54 -07:00
dpsutton
2fcd6ed374 handle strings rather than empty strings (#61426)
sqlserver returns columns with empty strings. not bad. just handle it
2025-07-24 13:38:35 -05:00
github-automation-metabase
680b24023c Bump com.taoensso/nippy from 3.5.0 to 3.6.0 (#59907)
Inspect dependency changes here: https://github.com/taoensso/nippy/blob/v3.6.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-24 18:10:22 +00:00
Jakub Chodorowicz
67aeb818ab Feature/smoother upgrade flow for customers (#61007)
* Prg-81-implement-logic-for-opening-store-and-receiving-messages (#60702)

* Add new self hosted upsell flow path

* Add upsell flow hook

* Add company name to params passed to store

* Update url parameters to snake case

* Remove redundant ampersand

* Clean up useEffect dependencies

* Add store origin to token activation message

* Improve put token mock

* Snake case return_url param

* Update messages' types

* Add source check on event

* Use dynamic store value (#60865)

* Create selector for store url

* Use dynamic store value in use upsell flow

* Improve store url selector

* Create useStoreUrl hook and deprecate getStoreUrl selector

* Increase the timeout of toast messages (#60966)

* increase the timeout of toast messages

* Send notification even if reference to store window was lost

* Add metabase window name (#60964)

* Prg-91-migrate-upsell-components-to-support-ee-upsell-flow (#60850)

* Enhance upsell functionality by adding onClick support to UpsellBanner and integrating useUpsellFlow in admin settings

Fix function name

* Use match pattern in UpsellBanner

* Add Upsell baner with click stories and tests

* Add upsell flow to dev instances banner

* Integrate upsell flow into UpsellBanner components

* Fix unrelated tests

* Improve the test assertion

* Prg-95-migrate-upsellcard-to-the-new-upsell-flow (#60989)

* Add onClock to UpsellCard component

* Migrate UpsellCard components to use self hosted upsell flow

* Disable new flow in dev instances upsell (#61048)

* Allow overriding store-url in dev env (#60967)

* Fix upsell flow with undefined store variable (#61056)

* Show failure toast even if connection with store was lost

* Add store-url to e2e default db setup

* Allow undefined store-url value in use upsell flow

* Fix failing unit tests

* Prg 96 migrate upsellbigcard to the new upsell flow (#61063)

* Migrace BigCard to use onClick

* Migrate BigCard upsells

* Add onClick to UpsellPill (#61076)

* Prg-104-run-the-new-upsell-flow-only-for-self-hosted-mb-instances (#61122)

* Disable new upsell flow on hosted instances

* Fix wrong match on UpsellBigCard

* Use getIsHosted selector

add test

* Fix e2e test - selecting upsell button

* Fix extra toast triggered with new upsells

* Add upsell flow to embedding ugprade link, remove binary notice from EE self serve (#61207)

* Fix typos

* Use existing link styles
2025-07-24 20:09:14 +02:00
Cam Saul
f197cbb591 lib/order-by should ignore duplicates (QUE-1604) (#61402) 2025-07-24 10:47:35 -07:00
bryan
85e8bcbc3d add CLA-passing email and name for bump commit (#61277) 2025-07-24 11:37:16 -06:00
bryan
50d9b94ccb run only when the Type:Documentation label set (#61427) 2025-07-24 17:25:20 +00:00
Phoomparin Mano
aa7ced174f feat(sdk): do not show "New Question" as fallback for new question (#61015) 2025-07-25 00:10:38 +07:00
bryan
7de1211bab mage -escherize-pr-summary (#61352) 2025-07-24 09:53:22 -07:00
Phoomparin Mano
fd5a433265 fix(sdk): hide the "back to previous results" button in questions (#61018) 2025-07-24 23:48:46 +07:00
Cam Saul
1bd2398307 Fix conversion of joins with :fields in last stage to legacy (QUE-1603) (#61401) 2025-07-24 09:08:59 -07:00
Nicolò Maria Mezzopera
2dc4715824 chore: Refactor sync wait times to use a constant for delay and adjus… (#61415)
* chore: Refactor sync wait times to use a constant for delay and adjust retry limits

* Update e2e/support/helpers/e2e-qa-databases-helpers.js
2025-07-24 14:38:32 +00:00
Edward Paget
e07751fe9e fix: flake dashboard card test (#60146) 2025-07-24 14:23:48 +00:00
Edward Paget
3cde309b3c fix: make test not parallel to avoid flake (#61327) 2025-07-24 09:05:00 -05:00
Kamil Mielnik
a1a437bd26 SEM-526 Filtering preview crashes when table is hidden (#61265)
* Fix crash

* Add test

* Update comment
2025-07-24 13:42:45 +00:00
Kamil Mielnik
59d8776683 SEM-362 Table picker should render anchor elements (#61272)
* Fix tags invalidation for bulk tables update

* Add MassTableVisibilityToggle

* Render mass toggle for schemas

* Add the button for dbs
- fix not-currently-selected branches in the tree not updating

* Fix types

* Align icon

* Align chevron icon

* Always show the toggle button for hidden tables

* Change color of hidden tables

* Only use ids of relevant tables

* Add tests

* Add test

* Take all visibility options into account

* Rename MassTableVisibilityToggle to BulkTableVisibilityToggle

* Fix color

* Render table picker items as anchors

* Remove measuring elements as elements have constant size

* Fix types and tests

* Add test
2025-07-24 20:06:33 +07:00
github-automation-metabase
f5e92dbce9 Bump org.apache.commons/commons-lang3 from 3.17.0 to 3.18.0 (#60901)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-24 15:30:04 +03:00
Oisin Coveney
fea73a4f5c Rename InteractiveQuestion symbols to SdkQuestion (#61213) 2025-07-24 12:07:08 +00:00
Uladzimir Havenchyk
3a7474eadc Revert "drop typescript-plugin-css-modules with stylus dependency to unblock …" (#61391)
This reverts commit 8a4c87a136.
2025-07-24 10:56:11 +00:00
Timofey Kachalov
967745c312 Adjust API docs sort order respecting the kind (#61407) 2025-07-24 13:17:15 +04:00
Cam Saul
0cf80c77f2 [Lib] Finish removing idents (#61310)
* [Lib] Finish removing idents

* Fix Kondo warnings

* cljfmt

* Another pass at fixing Kondo warnings

* Test fix 🔧

* Test fix 🔧

* Test fixes 🔧

* A few more fixes 🔧

* Another pass

* Test fix 🔧

* Test fixes 🔧

* Test fix 🔧

* Test fixes 🔧
2025-07-23 19:17:23 -07:00
Gustavo Saiani
09e2ee40e7 Update links (#61356) 2025-07-23 20:21:06 -03:00
Fraser
994e2ff647 Translate boolean content (#61366) 2025-07-24 10:32:21 +12:00
Fraser
afabd18f56 Add CLAUDE.md and copilot-instructions.md (#61313)
* Add CLAUDE.md and copilot-instructions.md
2025-07-24 10:32:08 +12:00
github-automation-metabase
a5e13bedd8 Bump org.postgresql/postgresql from 42.7.5 to 42.7.7 (#59518)
Inspect dependency changes here: https://github.com/pgjdbc/pgjdbc/blob/REL42.7.7/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-23 21:23:40 +00:00
bryan
5085f8ee19 rewrite clj-kondo/ignore for consistency (#61372) 2025-07-23 14:59:39 -06:00
Phoomparin Mano
341e81611e Migrate the new embed flow's snippets to use custom elements (#61330) 2025-07-23 20:38:46 +00:00
github-automation-metabase
22ddd2cba8 Bump djblue/portal from 0.59.1 to 0.59.2 (#61246)
Inspect dependency changes here: https://github.com/djblue/portal/blob/0.59.2/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 14:27:31 -06:00
bryan
3df17fd3a8 Add custom and default responses to openapi docs (#61339) 2025-07-23 13:39:29 -06:00
bryan
c3dbced191 [github actions] skip pngs optimize for merges (#61378) 2025-07-23 13:26:35 -06:00
dpsutton
8e836010fb Extra logging for temp storage (#61342)
Suspecting that instances OOM due to loading these into
memory. Increasing context and logging to help diagnose this:

When running tests:

```
clj -X:dev:test :only '["test/metabase/notification" "test/metabase/pulse"]'
...
DEBUG metabase.notification.payload.temp-storage - stored data in temp file {:length 57167}
[main] DEBUG metabase.notification.payload.temp-storage - stored data in temp file {:length 718167}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 55.8 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 198, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 55.8 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 198, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 701.3 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 199, :dashboard_id 77}
[main] INFO  metabase.notification.payload.temp-storage - reading temp storage file of size: 701.3 kb
[main] INFO  metabase.notification.payload.temp-storage - reading file with preamble: {:dashboard_tab_id nil, :card_id 199, :dashboard_id 77}
```

Adding an optional preamble that is just `pr-str`'d and logging a human
readable size of the file that is saved
2025-07-23 14:26:17 -05:00
Jeff Bruemmer
634c7942cd docs - join expressions (#61376) 2025-07-23 19:20:46 +00:00
Alex Yarosh
5cdf070465 Update impersonation.md (#61380) 2025-07-23 15:15:46 -04:00
Cam Saul
f1c7740a45 add-dimension-projections middleware => Lib (#61349)
* add-dimension-projections middleware => Lib (#39877)

* Ban mt/with-column-remappings inside QP tests

* Update pivot QP code to not convert to legacy

* Rename middleware

* Use the remap metadata provider in sandboxing tests
2025-07-23 09:59:33 -07:00
github-automation-metabase
df80eb95b6 Bump commons-validator/commons-validator from 1.9.0 to 1.10.0 (#60899)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 16:40:36 +00:00
github-automation-metabase
a525192b0b Bump org.apache.logging.log4j/log4j-jcl from 2.24.3 to 2.25.1 (#60905)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-23 10:30:34 -06:00
Ryan Laurie
07f1e62fae correct ci skip label check (#61370) 2025-07-23 16:13:48 +00:00
Anton Kulyk
b614b303ea Fix sorting dashboard header filters (#61220) 2025-07-23 15:56:14 +01:00
Nicolò Pretto
739e461866 skip assigning milestones to embed sdk PRs, closes EMB-658 (#61361) 2025-07-23 15:43:53 +02:00
Nicolò Maria Mezzopera
cd987d88a7 feat: await for async setup function (#61365) 2025-07-23 14:11:05 +02:00
Uladzimir Havenchyk
8a4c87a136 drop typescript-plugin-css-modules with stylus dependency to unblock builds (#61362) 2025-07-23 10:36:38 +01:00
Nicolò Pretto
f3953111ce fix unknown prop handleAxis on SdkIframeEmbedSetup (#61335) 2025-07-23 07:55:13 +00:00
Kamil Mielnik
d1345439f9 Remove unused functions (#61320)
* Remove fetchRealDatabasesWithMetadata

* Remove fetchTables

* Remove useActionListQuery
2025-07-23 14:00:08 +07:00
Sébastien
73b8863eb6 Closes VIZ-703 formatting of time values is incorrect (#61195) 2025-07-23 05:28:07 +02:00
Aleksandr Lesnenko
783d3ceca4 update parameters UI (#60746)
* update parameter styles, keep only one variant

* review

* specs

* Update Loki Snapshots

* lint

* tweak ui

* Update Loki Snapshots

* review

* fix spec

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-23 00:58:37 +00:00
bryan
6d31996556 add CLA-signed metabase automation user git config (#61350) 2025-07-22 22:54:46 +00:00
github-automation-metabase
f3f462d9cc Bump org.jsoup/jsoup from 1.20.1 to 1.21.1 (#60249)
Inspect dependency changes here: https://github.com/jhy/jsoup/blob/jsoup-1.21.1/CHANGES.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-22 16:47:10 -06:00
Jeff Bruemmer
1f0b41a30b add upgrade guide for SDK (#61031) 2025-07-22 20:18:57 +00:00
github-automation-metabase
1880b20c34 Bump com.amazonaws/aws-java-sdk-core from 1.12.785 to 1.12.788 (#61252)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-22 13:41:26 -05:00
Jeff Bruemmer
37cfdcfd3e docs - script to generate country codes table. (#61329)
* script to generate country codes

* link
2025-07-22 16:03:56 +00:00
Brad Anderson
a7ecc9e669 Closes VIZ-1311 - Slow loading dashcards with no average query duration shows 0 (#61035)
Tweaks slow-loading hover cards
2025-07-22 12:03:44 -04:00
Ryan Laurie
fda455fabc Enable CI skipping on PRs (#61307)
* dont run tests on pr with ci skip

* static viz too

* label instead of title
2025-07-22 09:47:26 -06:00
Sébastien
5d5f73f403 Closes VIZ-46 number formatting for remapped columns (#61201) 2025-07-22 17:35:54 +02:00
Sloan Sparger
7304c050ab [Metabot] Ensure state is saved on streamed responses (#61282) 2025-07-22 09:58:20 -05:00
github-actions[bot]
e8dee796db Update translations 2025-07-22 (#61314)
* Update translation sources 2025-07-22

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
2025-07-22 14:55:23 +00:00
eliotmetabase
3e605c6d87 Update uberjar.yml to remove unused branches (#61306)
Remove branches that no longer exist from uberjar workflow to clean it up a bit
2025-07-22 09:00:23 -05:00
Brad Anderson
1fc73ccc47 Closes VIZ-1318 - Visualize in another way uses the Card Definition rather than the Dashboard Card (#61230)
Changes how the bug is fixed from trying to send parameters to using dataset fallbacks if a query fails
2025-07-22 09:29:14 -04:00
Ngoc Khuat
3441035d2d port the condition expression to master (#61045) 2025-07-22 09:57:12 +00:00
Oleksandr Solovyov
d530b9a45c hashp without stdout redirect (#61315) 2025-07-22 09:30:50 +00:00
github-automation-metabase
5be18b9afd Bump hiccup/hiccup from 1.0.5 to 2.0.0 (#59908)
Inspect dependency changes here: https://github.com/weavejester/hiccup/blob/2.0.0/CHANGELOG.md

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2025-07-22 07:45:53 +00:00
Fraser
0a61f6688f Move Content Translation settings and tweak copy (#61039) 2025-07-22 14:27:21 +12:00
Tyler Plude
6421b4187e Add tsplude to metabot team (#61286) 2025-07-21 17:45:15 -07:00
Cam Saul
40ce015882 Overhaul add-implicit-joins, fix/consolidate metadata normalization and other issues (#61168)
* Overhaul add-implicit-joins middleware

* Restore the wacko metadata updating code

* Ok, joins ARE allowed to have :fields.

* Fix JS tests 🔧

* Fix QUE-1563

* Test fixes 🔧

* Fix 100 more broken things

* Test fixes

* Use same distinct-ref logic as lib

* More test fixes 🔧

* Make add-alias-info better at matching things

* Consolidate the legacy result metadata schemas

* cljfmt

* Use `:decode/normalize` in the REST API for boring things like metadata

* Another round of test fixes 🔧

* Restore kondo ignore

* Another round of test fixes 🔧

* cljfmt

* PR feedback 🔧
2025-07-21 13:54:28 -07:00
github-automation-metabase
b7d02f7d6c Bump commons-io/commons-io from 2.19.0 to 2.20.0 (#61245)
Inspect dependency changes here:

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2025-07-21 19:30:06 +00:00
Chris Truter
bf0624f700 Lint against incorrect time elapsed measurements (#61169) 2025-07-21 17:36:46 +00:00
Nicolò Maria Mezzopera
9f823bd747 chore: remove cy.wait in favour of waiting for element presence (#61226)
* chore: remove wait in favour of waiting for modal to disappear

* feat: wait for query to be completed to possibly avoid DB race condition

* feat: wait for the table name to be shown in the ui before clicking it

* chore: removed un-needed waits

* Update e2e/test/scenarios/admin/admin-reproductions.cy.spec.js

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-07-21 17:26:39 +00:00
Aleksandr Lesnenko
f881594d61 fix timeline events merging logic (#61239) 2025-07-21 13:02:29 -04:00
Romeo Van Snick
8401e8715d Disable :case and :coalesce type-compatibility checks (#61279)
* Disable :case and :coalesce type-compatibility checks

* Skip test
2025-07-21 16:56:26 +00:00
Jakub Chodorowicz
1cd2a7dafe Fix flaky SettingsPage test (#61009)
* Fix flaky SettingsPage test

* Use role selector
2025-07-21 17:44:14 +02:00
Romeo Van Snick
cd77efaf80 Relocate expressions code (#61120)
* Move expression widget into subfolder

* Import expression components from top-level

* Move expression helpers to metabase/querying/expressions

* Fix fuzzing paths

* Fix comment

* Add missing exports from expressions

* Remove unused exports

* Sort exports

* Add helper to get supported clauses

* Rename complete to suggestions for consistency

* Move tokenAtPos to position module

* Move assertion helpers to utils

* Split up pratt/types

* Use token text instead of slicing source

* Remove superflouous from and to on token

* Remove superflouous from, to and len on token

* Remove content helper

* Remove superflous fields on Token

* Rename compiler to compile-expression

* Fix imports

* Fix exports

* Remove eslint directives

* Move FK_SYMBOL to formatting/constants

* Use () => undefined instead of jest.fn
2025-07-21 17:35:57 +02:00
Brad Anderson
e50e3ddad8 VIZ-1287 Adds pressed state for visualizer Settings button (#61101) 2025-07-21 11:25:40 -04:00
Alexander Polyankin
b6174a8a0c Make Booleans work without Category (#61202) 2025-07-21 15:10:24 +00:00
github-actions[bot]
4956974743 Update translations 2025-07-17 (#61144)
* Update translation sources 2025-07-17

* Update translations

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Jacob Joseph <likeshumidity@users.noreply.github.com>
2025-07-21 14:49:44 +00:00
Sébastien
2c2863cb9d Update team.json (#61254) 2025-07-21 16:32:54 +02:00
Kamil Mielnik
1e22b1971c SEM-505 The Preview button should be more noticeable and accessible (#61260)
* Move buttons into the sticky container, make preview button always present

* Update tests

* Make the preview button toggle the state
2025-07-21 21:19:45 +07:00
Rodrigo López Dato
0ff7a8887c Fix "Docker Hub" capitalization (#61268) 2025-07-21 11:03:48 -03:00
Kamil Mielnik
4e04711a2d Mass hide/unhide tables (#61206)
* Fix tags invalidation for bulk tables update

* Add MassTableVisibilityToggle

* Render mass toggle for schemas

* Add the button for dbs
- fix not-currently-selected branches in the tree not updating

* Fix types

* Align icon

* Align chevron icon

* Always show the toggle button for hidden tables

* Change color of hidden tables

* Only use ids of relevant tables

* Add tests

* Add test

* Take all visibility options into account

* Rename MassTableVisibilityToggle to BulkTableVisibilityToggle
2025-07-21 13:56:15 +00:00
Romeo Van Snick
f38a0f6769 Allow supression of case and coalesce arg typechecks (#61264)
* Allow supression of case and coalesce arg typechecks

* Add test for ignored type-check

* Configure *suppress-expression-type-check?* in tests

* Fix formatting
2025-07-21 15:44:39 +02:00
Oisin Coveney
7e1ab4e2c7 Make sure that user plugin dashcard menu has priority over default menu (#61262) 2025-07-21 15:56:02 +03:00
Oisin Coveney
13d4abff0b Fix dashboard loading state for empty dashboards (#61052) 2025-07-21 14:46:30 +03:00
Ngoc Khuat
f1f175e4e5 Reversion the migration to fix v_alerts from 56 to 55 (#61161) 2025-07-21 12:42:36 +02:00
Nicolò Pretto
f4ac64fd80 Hide sample database mentions in <DatabaseForm> in the embedding setup (#61067)
* refactor DatabaseForm to fix unwanted changes to the embedding setup

* text-secondary

* clean up types
2025-07-21 11:00:05 +02:00
Kamil Mielnik
ff7eb5f1f5 SEM-497 Filtering preview inputs get auto-focused (#61190)
* Add autoFocus prop to filter components

* Disable autoFocus in preview

* Update unit tests

* Add test
2025-07-21 14:23:18 +07:00
Fraser
b241401b2d Fix Cloud SMTP Connection Card styling (#61115) 2025-07-21 09:41:31 +12:00
William
fea9b59511 Allow field filters and time groupings to specify an alias (#61118)
As is, field filters and time groupings assume that they can just refer to the field normally.  In queries where aliases are
used/required, this doesn't work so well.  Letting users specify the alias to use in place of the normal field
reference handles this case.

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-07-18 14:34:41 -05:00
Sloan Sparger
0374a8ac42 [Metabot] Improve loading experience logic (#61173)
* improve loading experience logic and fix bug where there are tool calls without messages causing messages to get cramed together with no space

* add a unit test
2025-07-18 14:03:46 -05:00
Aleksandr Lesnenko
d43c0a418b Fix visualizer cards crash due to inability to find the x-axis dimension column (#61180)
* fix visualizer cards crash

* reapply metabase#60892

* spec
2025-07-18 14:37:43 -04:00
Nick Fitzpatrick
d3435af399 Change styling for Home Help Component (#60180)
* Updating HomeHelpCard

* remove duplicated style
2025-07-18 15:02:22 -03:00
Alexander Polyankin
43ff1d6a13 Multiple values for native query parameters (#60984) 2025-07-18 17:45:33 +00:00
Nicolò Pretto
c4aca6545e fix(sdk): when starting from an entity id dashboard, use the numeric id (#61188)
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-18 22:18:52 +07:00
Uladzimir Havenchyk
f7288acbfe test: ensure popover contains delete permanently in trash (#61199) 2025-07-18 17:46:45 +03:00
Nicola Mometto
c57656fbfa Bigquery nested fields fix (#61193)
* scope by table-name

* add test
2025-07-18 15:09:44 +01:00
bryan
f24a7fdc18 crush every docs png in the repo (#61172) 2025-07-18 13:51:57 +00:00
Alberto Perdomo
22e6fd8d57 Update SDK NPM link in docs (#61192) 2025-07-18 15:17:13 +02:00
Nick Fitzpatrick
52d9ba6670 adjusting layout for <Tab.Tab> and <Button> components (#60992)
* adjusting layout for <Tab.Tab> and <Button> components

* update UserListElement
2025-07-18 09:55:36 -03:00
Uladzimir Havenchyk
0c2dddf2bc test: fix another flakiness in model re-mapping test (#61186) 2025-07-18 15:37:00 +03:00
Kamil Mielnik
aa691b0888 SEM-501 Add warning when multiple Entity Name field semantic types exist on the same table (#61148)
* Add warning

* Show prefixes

* Add test
2025-07-18 12:07:58 +02:00
Anton Kulyk
037cd61c9e Allow "focusing" a recently moved dashboard filter (#61085)
* Add `extraAction` prop to `undo` object

* Make `setEditingParameter` switch tab if needed

* Put a dashboard filter in the viewport

* Fix toast text appearance

* Hide "Show filter" button when moving to top nav

* Add e2e test

* Fix tests
2025-07-18 10:57:48 +01:00
Kamil Mielnik
5e08c9e9e1 SEM-390 Change copy of "Duration" to "Reset to defaults after" for log level customization (#61183)
* Update copy

* Update copy

* Bring back non-numeric prefix

* Reduce flickering (thanks @romeovs)

* Fix test
2025-07-18 16:42:34 +07:00
Oisin Coveney
2568336e90 Make ArchivedEntityBanner a context component (#60939) 2025-07-18 10:40:10 +03:00
Uladzimir Havenchyk
0ba623e4ba test: fix flakiness in model mapping test (#61146) 2025-07-18 10:39:14 +03:00
Vamsi Peri
4ff56367f9 Fix transparent background for SQL editor autocomplete suggestions (#61178)
Co-authored-by: Claude <noreply@anthropic.com>
2025-07-17 21:43:47 -04:00
Tyler Plude
c1484f5f57 Sort currency options by name not code (#60794)
* fix currency sort order in settings dropdown

* Preserve priority currency order; apply sort helper to other currency select inputs

* currency.js -> currency.ts

* move sort to cljc; revert FE changes

* rm unnecessary comment
2025-07-17 18:15:46 -07:00
Aleksandr Lesnenko
59193a2267 sort parameters in subscription sidebar (#61119) 2025-07-17 20:28:23 -04:00
Sloan Sparger
fb99cfcdc6 [Metabot] Fix horizontal scrollbar when response contains code (#61174) 2025-07-17 18:57:26 -05:00
Aleksandr Lesnenko
cfb3d5ad2e improve getParameterMappingOptions (#61113) 2025-07-17 19:43:49 -04:00
Tyler Plude
9eb27dc5c9 VIZ-1281 - Fix include-current for dashboard parameters (#60890)
* Pass parameter format options to lib

* pr feedback
2025-07-17 15:51:13 -07:00
dpsutton
9753a8a64d Ensure postgres downloads don't OOM (#60807)
* Ensure postgres downloads don't OOM

Fixes https://github.com/metabase/metabase/issues/60733

For performance reasons we set autocommit to true. this has an
unfortunate consequence that the postgres driver does not honor batch
sizes. We go through a lot of trouble to hook the streaming results of a
query to the output stream of the download, but the postgres jdbc driver
will realize all rows in memory.

A fast way forward is to set autocommit to false only when
`write?` (previous condition) or when executing a postgres download, as
reported in https://github.com/metabase/metabase/issues/60733.

How to test:
this is difficult. In CI we use

```clojure
  :ci
  {:jvm-opts ["-Xmx12g"
              "-Xms12g"
```

So hitting a query that would deterministically OOM the instance
requires a lot more muscle than we realistically want to use.

I'm running the following tests locally:

```
  :small-ram
  {:jvm-opts ["-Xmx400m"
              "-Xms400m"
              "-Dci=TRUE"]}
```

```clojure
(defn- readable [bytes]
  (cond (nil? bytes)  "0 bytes"
        (zero? bytes) "0 bytes"
        :else
        (let [units ["b" "kb" "mb" "gb" "tb"]
              magnitude   1024.0]
          (loop [[unit & remaining] units
                current (double bytes)]
            (if (and (seq remaining) (> current magnitude))
              (recur remaining (/ current magnitude))
              (format "%.1f %s" current unit))))))

(defn- consume
  [^java.io.InputStream is]
  (let [arr (byte-array 8024)]
    (loop [c 0, gas 5000000]
      (let [r (java.io.InputStream/.read is arr 0 (alength arr))]
        (cond (zero? gas)
              (throw (ex-info "Ran out of gas" {}))
              (neg? r) c
              :else (recur (+ c r) (dec gas)))))))

(deftest large-csv-test
  (mt/test-driver :postgres
    (testing "Postgres can download csvs without holding the entire results in memory #(#60733)"
      (let [large-query "SELECT repeat('x', 2048) FROM generate_series(1, 1000000)"
            result (mt/user-real-request :crowberto :post 200 "dataset/csv"
                                         {:request-options {:as :stream}}
                                         {:query       (mt/native-query
                                                        {:query large-query})
                                          :format_rows true})
            size (consume result)]
        (is (> size 2000000000)
            (format "Only consumed %s but expected ~2gb" (readable size)))))))
```

and then

```
❯ time source pg.env && DRIVERS=postgres clojure -X:dev:test:small-ram :only metabase.driver.postgres-test/large-csv-test

Running QP tests against these drivers: #{:postgres}

LONG TEST in metabase.driver.postgres-test/large-csv-test
Test took 23.358 seconds seconds to run

Ran 1 tests in 32.825 seconds
2 assertions, 0 failures, 0 errors.
{:test 1, :pass 2, :fail 0, :error 0, :type :summary, :duration 32825.099875, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 40.7 s.
All tests passed.
Running after-run hooks...
```

Why not add these tests now?
We probably should write a full memory regression suite. This is a great
candidate for a first one. But it seems silly to run a new CI job with
just this one job. Push back if you think i'm wrong.

Another area of pushback:
I took the lazy way when determining if a driver should have autocommit
set to false or not: i hardcoded it.

```clojure
(and (-> options :download?) (= driver :postgres))
```

The alternative is some method of a new driver multimethod or
driver-supports?. The former feels a bit heavy-weight, the latter feels
not quite right since this is almost a non-support and all other jdbc
drivers do support it, presumably?

I'm quite open to pushback here and invite comments if you see a better way.

* Can't use an if for write?

You'd think you can use an if here but the previous code used a when and
is silent on write?. Lots of tests fail relating to datasets in test
setup and uploads. Don't want to debug that in this bug fix context so
leaving a todo

* remove old arity metadata. thanks eastwood!

* Don't set autoCommit for all postgres and descendant drivers

```clojure
(ns ^:mb/memory metabase.memory.csv-test
  (:require
   [clojure.test :refer :all]
   [metabase.test :as mt]
   [metabase.driver :as driver]))

(set! *warn-on-reflection* true)

(defn- readable [bytes]
  (cond (nil? bytes)  "0 bytes"
        (zero? bytes) "0 bytes"
        :else
        (let [units ["b" "kb" "mb" "gb" "tb"]
              magnitude   1024.0]
          (loop [[unit & remaining] units
                 current (double bytes)]
            (if (and (seq remaining) (> current magnitude))
              (recur remaining (/ current magnitude))
              (format "%.1f %s" current unit))))))

(defn- consume
  [^java.io.InputStream is]
  (let [arr (byte-array 8024)]
    (loop [c 0, gas 5000000]
      (let [r (java.io.InputStream/.read is arr 0 (alength arr))]
        (cond (zero? gas)
              (throw (ex-info "Ran out of gas" {}))
              (neg? r) c
              :else (recur (+ c r) (dec gas)))))))

(def driver->query
  {:sqlite "WITH RECURSIVE generate_series(value) AS (
  SELECT 1
  UNION ALL
  SELECT value + 1 FROM generate_series WHERE value + 1 <= 1000000
)
SELECT replace(hex(zeroblob(1024)), '00', 'xx') FROM generate_series;"
   :postgres "SELECT repeat('x', 2048) FROM generate_series(1, 1000000)"
   :clickhouse "SELECT repeat('x', 2048)
FROM system.numbers
LIMIT 1000000;"
   :redshift "WITH series AS (
  SELECT ROW_NUMBER() OVER () as i
  FROM stl_scan s1, stl_scan s2
  LIMIT 1000000
)
SELECT REPEAT('x', 2048) FROM series;"})

(deftest large-csv-test
  (mt/test-drivers #{:postgres :sqlite :clickhouse :redshift}
    (testing "Postgres can download csvs without holding the entire results in memory #(#60733)"
      (let [large-query (or (driver->query driver/*driver*)
                            (throw (ex-info "Driver doesn't implement big query"
                                            {:driver driver/*driver*
                                             :available (keys driver->query)})))
            result (mt/user-real-request :crowberto :post 200 "dataset/csv"
                                         {:request-options {:as :stream}}
                                         {:query       (mt/native-query
                                                        {:query large-query})
                                          :format_rows true})
            size (consume result)]
        (is (> size 2000000000)
            (format "Only consumed %s but expected ~2gb" (readable size)))))))

(comment
  (mt/set-test-drivers! #{:postgres})
  (mt/set-test-drivers! #{:sqlite})
  (mt/set-test-drivers! #{:clickhouse})
  (mt/set-test-drivers! #{:redshift})
  (mt/test-drivers #{:redshift}
    (mt/db))

  )

```

Verify this with

```
  :small-ram
  {:jvm-opts ["-Xmx400m"
              "-Xms400m"
              "-Dci=TRUE"]}
```

and then

```
;; driver.env:
;; local clickhouse
export MB_CLICKHOUSE_TEST_password="password"
export MB_CLICKHOUSE_TEST_username="default"

;; local postgres
export MB_POSTGRESQL_TEST_USER=dan

export MB_REDSHIFT_TEST_PASSWORD=<value>
export MB_REDSHIFT_TEST_USER=<value>
export MB_REDSHIFT_TEST_DB=<value>
export MB_REDSHIFT_TEST_HOST=<value>
```

and then running:

```
❯ source driver.env && DRIVERS=redshift clojure -X:dev:test:drivers:drivers-dev:ee:ee-dev:small-ram :only metabase.memory.csv-test/large-csv-test
...
Running tests in metabase.memory.csv-test/large-csv-test
Finding tests took 8.3 s.
Running 1 tests
Running before-run hooks...
Running QP tests against these drivers: #{:redshift}
..
LONG TEST in metabase.memory.csv-test/large-csv-test
Test took 188.320 seconds seconds to run

Ran 1 tests in 188.338 seconds
2 assertions, 0 failures, 0 errors.
{:test 1, :pass 2, :fail 0, :error 0, :type :summary, :duration 188337.678584, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 3.3 mins.
All tests passed.
Running after-run hooks...
```

redshift takes a while.

contrast with

```
❯ source driver.env && DRIVERS=clickhouse,postgres clojure -X:dev:test:drivers:drivers-dev:ee:ee-dev:small-ram :only metabase.memory.csv-test/large-csv-test
...
Running QP tests against these drivers: #{:postgres :clickhouse}
...
LONG TEST in metabase.memory.csv-test/large-csv-test
Test took 46.638 seconds seconds to run

Ran 1 tests in 46.655 seconds
4 assertions, 0 failures, 0 errors.
{:test 1, :pass 4, :fail 0, :error 0, :type :summary, :duration 46655.436333, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 56.5 s.
All tests passed.
Running after-run hooks...
```

both running locally happen in ~1 minute compared to 3 minutes for redshift

* Remove commented out old arity

this funciton used to have two arities for clarity. But it wasn't
another entrypoint, it was just trying to keep things a bit cleaner. But
the result is that at the point where we used the string sql query we
didn't have the `info` map in lexical scope. Fixing this across arities
would have pushed us into 7 positional args, so you might want to switch
to a map, but honestly, it's just the same function.
2025-07-17 17:06:12 -05:00
Cam Saul
ea6a639b63 [Lib] Remove idents part 4 (#61149)
* [Lib] Remove idents part 4

* Kondo
2025-07-17 14:38:30 -07:00
bryan
2454ab7188 Mage Token Git Precommit Scanner (#60729)
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-17 12:41:22 -06:00
Uladzimir Havenchyk
517f98bf5c test: fix flakiness in visualizer test (#61104) 2025-07-17 20:19:24 +03:00
Kamil Mielnik
0e75b6bbac SEM-463 Responsive buttons (#60928)
* Add ResponsiveButton component

* Prevent focus state being cut off

* Make the buttons responsive in the table section

* Make the buttons responsive in field section

* Extract useResponsiveButtons

* Add comments

* Extract useResponsiveButtons in FieldSection

* Add aria-label to the button

* Add tests

* Test tooltips

* Fix indent
2025-07-17 17:17:44 +00:00
Timofey Kachalov
82bad2ee19 Fix positioning of the Mantine Modal in SDK (#60917) 2025-07-17 20:54:03 +04:00
Phoomparin Mano
87afb2783f Reduce flakiness in new iframe embed locale test (#60973) 2025-07-17 23:33:03 +07:00
Anton Kulyk
ca73c4406e Add dashboard_filter_moved analytics event (#61084)
* Add `dashboard_filter_moved` analytics event

* Update event
2025-07-17 17:17:49 +01:00
Kamil Mielnik
e0e25ed230 Fix SEM-499 (#61131) 2025-07-17 23:11:57 +07:00
Cam Saul
2505c039bf [Lib] remove 'idents' part 3 (#60875)
* [Lib] remove 'idents' part 1

* [Lib] remove idents part 2

* [Lib] remove idents part 3

* Update tests

* Remove ident-related tests for Cards

* Remove more ident tests

* Remove more ident-related tests

* Fix Kondo warnings
2025-07-17 08:10:14 -07:00
Jeff Bruemmer
f2ce68cd98 Update saml-google.md (#61137) 2025-07-17 10:58:59 -04:00
Sloan Sparger
dc5ed72564 [Metabot] Add new teammates to Team Metabot (#61143) 2025-07-17 09:53:08 -05:00
Anton Kulyk
58717801ec Add "Move filter" menu (#60784)
* Add "move filter" menu

* Add undo

* Handle single tab dashboards

* Update text color for checked items

* Fix collapsed menu appearance

* Add tests

* Fix error when a tab doesn't have any dashcards

* Fix "Top of page" option selected color

* Use "card.title" viz setting

* Truncate long card titles

* Update "Disconnect from cards" button appearance

* Fix type error

* Make the select searchable, touch up on appearance

* Fix e2e test

* Add `moveDashboardFilter` helper

* Fix e2e test name

* Remove subtitles

* Update icon color

* Update icon color
2025-07-17 15:49:22 +01:00
bryan
92d757b132 Mage jar-download custom dir fix (#61138) 2025-07-17 14:48:37 +00:00
Nicolò Pretto
ff702a180c skip sdk compat tests as they're failing (#61136)
* skip sdk compat tests as they're failing

* make the yml pass validation
2025-07-17 14:35:22 +00:00
Phoomparin Mano
878fc256b6 Do not update new iframe embed flow preview if the same resource is chosen (#61014) 2025-07-17 20:41:16 +07:00
Alexander Polyankin
edfb5fe39c Make temporal unit variables work like regular variables (#60995) 2025-07-17 09:32:36 -04:00
Kamil Mielnik
d626289c81 SEM-512 It would be great if all toasts in Table Metadata had an Undo (#60974)
* Add undos in FieldSection

* Add undos in FormattingSection

* Add undos in MetadataSection

* Add undos in FieldItem

* Organize TableVisibilityToggle

* Add undos in BehaviorSection

* Add undos in TableSection

* Add trim()

* Never pass 2nd argument in onChange callbacks from Select

* Add undos in DataSection

* Fix SEM-499

* Add undos in RemappingPicker

* Reduce duplication

* Simplify code

* Rename

* Prevent undo loops in FieldSection

* Remove redundant param

* Refactor toasts in FieldSection

* Prevent undo loops in FormattingSection

* Prevent undo loops in MetadataSection

* Prevent undo loops in BehaviorSection

* Prevent undo loops in DataSection

* Prevent undo loops in TableSection

* Prevent undo loops in FieldItem

* Prevent undo loops in TableVisibilityToggle

* Prevent undo loops in RemappingPicker

* Reuse useMetadataToasts

* Fix types

* Fix undoing semantic type

* Update unit tests

* Update NameDescriptionInput unit tests

* Simplify argument

* Update tests, fix viz formatting inputs not respecting prop updates

* Revert "Fix SEM-499"

This reverts commit bb9f098433.

* Add more tests

* Avoid casting

* Remove redundant cast
2025-07-17 12:30:33 +00:00
Chris Truter
0adf8b5d5b Refresh Search index after loading serialized entities (#61053) 2025-07-17 12:12:33 +00:00
Oisin Coveney
9a6113cff5 Rename files, components, and types to SdkQuestion (#60996) 2025-07-17 15:12:06 +03:00
Oisin Coveney
59c1d93c76 Convert dashboard sidebar components to use dashboard context (#60715) 2025-07-17 14:56:45 +03:00
Kamil Mielnik
ff989915fb Fix flaky test (#61126) 2025-07-17 18:50:07 +07:00
Kamil Mielnik
19e9ec0cd3 SEM-503 + SEM-504 + SEM-509 + SEM-510 Micro UI/UX improvements (#60970)
* SEM-503 Add blue border to selected field

* SEM-504 Border radius of table/field name and description boxes should match that of setting cards

* SEM-509 Improve microcopy for table and field editing instructions

* SEM-510 Field descriptions could use "paragraph" text style with greater line height
2025-07-17 14:12:36 +07:00
Cam Saul
f67919695d MBQL 5 normalization should automatically add options maps (#61081) 2025-07-16 17:56:11 -07:00
Cam Saul
466f7879da [Lib] remove 'idents' part 2 (#60874)
* [Lib] remove 'idents' part 1

* [Lib] remove idents part 2

* Remove ident-related tests for Cards

* Remove more ident-related tests

* Fix Kondo warnings
2025-07-16 17:55:35 -07:00
Alexander Polyankin
bdfae3d613 Boolean variables in native queries (#60991) 2025-07-16 19:41:56 -04:00
Sloan Sparger
424bb4d19e [Metabot] Add text for search tool when being called (#61099) 2025-07-16 16:54:21 -05:00
Riley Thompson
b75ef21b91 Enable DB routing for BigQuery (#60516)
* save

* revert redshift changes

* kondo

* add ci routing var

* redshift rough work

* cleanup bigquery changes

* remove bigquery specific redefs and bindings

* add separate var for dataset

* custom routing info per driver

* update changelog

* cljfmt

* fix fe lint

* use deferred-tru

* dissoc db_routing_info for tests

* fix other tests

* fix kondo and lint

* use yaml

* fix whitespace

* change log

* kondo and eastwood

* use markdown for routing info

* remove unneeded driver method

* cleanup

* fix tests

* fix remaining test

* add fe test

* add extra info in register-lazy-loaded-driver

* address pr comment

* improve doc string

* add text-secondary color to database info markdown

* update markdown

* alphabetical order

* move db routing info from db to session properties

* FE adjustments

* dont parse extra info

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2025-07-16 17:20:26 -04:00
Tyler Plude
3f01f61624 VIZ-1048 - Visualizer Data Importer Improvements (#59139)
* poc

* timing logs

* Only render compatible datasets

* Build uberjar to be able to test in cloud with more data

* search index support for display

* search index support for exclude-display and has-temporal-dimensions

* fix weird filter vs index column bug

* fix temporal filter

* required ids search index filter

* fix build by removing :display from search render-terms

* adding h2 compatibility

* fixing alignment

* whitespace

* all clicks are add clicks now

* reverted labels change

* whitespace

* whitespace

* mutation -> query, load compatibles at startup

* using viz icons in dataset list

* remove exclude_display

* consolidate search endpoint

* rename display param to display_type

* allignment

* fix filter tests

* test fixes

* Closes VIZ-1185: revert "using viz icons in dataset list"

This reverts commit 7f4d177e977643f90250a5add2f946d6f35ad2a0.

* closes VIZ-1184 copy for "no results"

* closes VIZ-1183 spacing between input and results

* removed log statement

* fixed type

* fixed basics.cy.spec.ts

* fixed dashboard-questions.cy.spec.js

* fixed sharing-reproductions.cy.spec.js

* fixed snowplow-tracking.cy.spec.ts

* fixed funnels.cy.spec.ts

* fixed others

* fix import

* return new fields in results for in-place engine

* test fix

* test fix attempt

* rm backup file

* fixed more e2e tests

* fixup

* more stabilization of e2e tests

* tweak whitespace

* first attempt to fix failing postgres tests

* try a simpler approach

* closes VIZ-1227 search not triggered when no datasource is selected

* new attempt to parameterize the define-spec macro with app-db

* removing non-temporal-dimension-ids filter

* fix cljkondo

* fix test

* fixed e2e (snowplow)

* fixed e2e (funnels)

* fixed e2e (basics)

* better loading state, better typing

* reverted type change

* uncomment e2e cartesian; remove unused search param; fix bg color

* Fix query to resolve to false instead of nil

---------

Co-authored-by: Eliot Daigneault-Mestre <eliot@metabase.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-07-16 14:08:03 -07:00
metamben
4927b35f0f Stop offering expressions and aggregation being edited as columns (#61033)
* Stop offering expressions and aggregation being edited as columns

Fixes #61010

* Add repro for metabase#61010

* Add test for custom columns too

* Update expected error message in e2e test

* Detect cycles in resolver too

* Revert "Detect cycles in resolver too"

* Add e2e test for referencing custom expressions that are just wrappers

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-07-17 00:03:34 +03:00
Nemanja Glumac
481065bc8f Optimize writable QA DB snapshot creation process (#60898) 2025-07-16 20:47:37 +00:00
Braden Shepherdson
d10fafd538 [parameters] Use MBQL lib to query for field values from a card (#60510)
Fixes #44077. Fixes #35840.

Previously this used some custom legacy MBQL manipulation. It was
incorrect and led to a handful of bugs. Now it's a straightforward
edit of the query powered by MBQL lib.
2025-07-16 16:20:28 -04:00
Romeo Van Snick
b76a18112a Fix parameter target popover empty state (#60990)
* Add missing min-height to ParameterTargetList

* Add repro for metabase#60987

* Update list when clearing cache

* Remove minWidth

* Always disable virtualization in AccordionList

* Use Mantine Popover in DashCardCardParameterMapperButton

* Remove virtualization from AccordionList altogether

* Remove superflouous wrapper for Clause popover

* Add box sizing to dashcardmapper

* Remove withBorders prop

* Remove more unused instance properties from AccordionList

* Add repro for metabase#46767

* Add key to parameter mapping button

* Trap focus in parameter mapping popover

* Close toasts to avoid overlapping popovers

* Ignore search box in check

* Add missing tooltip

* Fix selector

* Fix selector

* Close popover when selecting value

* Revert "Remove superflouous wrapper for Clause popover"

This reverts commit 5a13c826f4.

* Use H.tooltip helper

* Use cy.trigger instead of realHover

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-07-16 20:43:28 +02:00
Jacob Joseph
b39cfa3b6a Update sql-parameters.md (#61096)
fixed missing double quotes
2025-07-16 18:29:41 +00:00
Riley Thompson
23eeb71330 Clear secret file memoization when DB details have changed (#60503)
* clear secret file memoization on db update

* add rsa env vars

* improve test

* add more narrow test

* improve test

* refactor snowflake private key test to create and drop user per test

* use accountadmin role

* try granting sysadmin

* try using accountadmin role

* use correct details

* throw exceptions for unimplemented methods

* clean up test code
2025-07-16 14:19:07 -04:00
Edward Paget
1e088b195a fix: don't recurse in check-block-permissions (#61078) 2025-07-16 13:09:14 -05:00
SabarigirisanSivakumarREO
5601b31019 Locale updates on LanguageStep submit (#60184) 2025-07-16 11:58:29 -06:00
SabarigirisanSivakumarREO
6c6e042e20 Update button focus styling in setup flow (#60175)
* Button focus has been updated

* fixed color usage & onlyIcon button
2025-07-16 11:58:04 -06:00
Riley Thompson
6f94207bdf Use different login and user names for sqlserver impersonation setup (#60743)
* use different login and user names for sqlserver impersonation setup

* Require role

* fix sqlserver test

* move feature supported def

* remove outdated test
2025-07-16 13:42:11 -04:00
Ryan Laurie
83178c42e9 Show Application Permission Saving Errors (#61038)
* show errors when saving permissions

* use new confirm modal
2025-07-16 17:16:34 +00:00
Ryan Laurie
366e28ab80 fix git log logic for release logs (#61012) 2025-07-16 11:04:23 -06:00
Ryan Laurie
e3a45d5996 Shard jest tests (#53638)
* shard jest tests

* dont fail fast

* remove coverage
2025-07-16 11:03:36 -06:00
Ryan Laurie
23ed37fcb3 run frontend test coverage nightly (#61077)
* run frontend test coverage nightly

* SPACE
2025-07-16 11:01:59 -06:00
Uladzimir Havenchyk
2768c95be3 test: fix flakiness in table resizing (#61064) 2025-07-16 19:30:50 +03:00
Phoomparin Mano
0b73abd44e Make new iframe embed flow's parameter placeholder text contextual (#61006) 2025-07-16 23:28:46 +07:00
Filipe Silva
1dd56e5f14 Postgres Replication to Cloud Storage (#59709)
* feat: harbormaster openapi client

* feat: pg replication backend

* feat: pg replication frontend

* ci: label for build docker job

* fix: update attached-dwh crufty tables on sync :update

Fix https://linear.app/metabase/issue/CLO-4223/mb-does-not-update-crufty-table-settings-on-config-change

* fixup: minor FE review items

* fixup: pg-replication -> database-replication

* fixup: use db driver feature in DatabaseReplicationSection

* fixup: jt link needs unique k

* fix: cache? not cache on setting
2025-07-16 11:09:01 -05:00
lbrdnk
bcd9ce522b Fix coercion overwrite (#61055)
* Fix coercion overwrite

* Adjust test
2025-07-16 17:14:17 +02:00
Uladzimir Havenchyk
87d57b5880 test: fix flakiness in dashcard resizing (#61066) 2025-07-16 18:14:04 +03:00
Nicolò Maria Mezzopera
8eec882c31 docs: add callout to driver build to the beginning of the guide (#61071) 2025-07-16 16:53:01 +02:00
Mahatthana (Kelvin) Nomsawadi
1bf726bddc feat(sdk): Create new dashboard question from EditableDashboard (#60920)
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2025-07-16 21:22:37 +07:00
Brad Anderson
75df8b0ce6 Removes blue slow-loading card border (#60998) 2025-07-16 09:37:10 -04:00
Rodrigo López Dato
788fd1922c Fix "Github" capitalization in all Markdown files (#61034) 2025-07-16 09:02:03 -04:00
Alberto Perdomo
cc23721d9c docs(sdk): add limitations around leaflet 1 (#61057)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-07-16 20:00:38 +07:00
Oisin Coveney
2ff890692e feat(sdk): Add withDownloads to the static question (#60976) 2025-07-16 15:46:01 +03:00
Abed Habli
8a6b842320 docs: leaf fields sync limit for MongoDB (#61011)
* adding the leaf fields limit

* updating
2025-07-16 10:00:47 +02:00
Nicolò Maria Mezzopera
c5118e2517 fix css issues in the Native Query Editor (#60929)
* feat: swap span for flex in Trigger component with chevron

* chore: use span in flex component

* feat: add small left padding to native editor action buttons

* chore: fix typo on data-testid file

* chore: force viewport to be big enough in cy test

* feat: force the test to small window and execute the drag vertically
2025-07-16 09:03:44 +02:00
Ngoc Khuat
bdc56af8e7 Simplify slack channel implementation (#60838) 2025-07-16 10:37:50 +07:00
7407 changed files with 939159 additions and 623056 deletions

View File

@@ -1,7 +1,7 @@
;; -*- comment-column: 100; -*-
{:config-paths ["macros" "src" "config"]
:linters
{;;
{ ;;
;; enabled optional linters (these are disabled by default)
;;
@@ -25,6 +25,7 @@
:reduce-without-init {:level :warning}
:redundant-call {:level :warning}
:redundant-fn-wrapper {:level :warning}
:redundant-str-call {:level :warning}
:self-requiring-namespace {:level :warning}
:single-key-in {:level :warning}
:unsorted-imports {:level :warning}
@@ -49,7 +50,7 @@
;; 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?
;;
@@ -68,6 +69,7 @@
:metabase/validate-logging {:level :warning}
:metabase/validate-mb-driver-tests {:level :warning}
:metabase/validate-mb-once {:level :warning}
:metabase/discourage-millis-duration {:level :warning}
:metabase/validate-deftest
{:level :warning
@@ -172,7 +174,7 @@
metabase.driver.sql-jdbc.execute/execute-prepared-statement!
metabase.notification.models/create-notification!
metabase.pulse.send/send-pulse!
metabase.query-processor.store/store-database!
metabase-enterprise.transforms-python.python-runner-test/execute!
;; Safe in tests, where we typically use a private, temporary index per thread.
metabase.search.core/reindex!
metabase.util/run-count!
@@ -186,7 +188,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
@@ -214,7 +216,7 @@
;; 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]} ; TODO (cam): can we fix these?
:refer-all {:level :warning, :exclude [clojure.test]}
:unused-referred-var {:exclude {compojure.core [GET DELETE POST PUT]}}
@@ -228,7 +230,7 @@
(clojure.core.logic/fresh)
(clojure.core.logic/matcha)
(clojure.core.logic/run)
(clojure.test/is [query= =? malli= qv=])
(clojure.test/is [=? malli= qv=])
(clojure.tools.macro/macrolet)
instaparse.core/transform
(metabase.server.streaming-response/streaming-response)
@@ -249,16 +251,15 @@
(taoensso.nippy/extend-freeze)
(taoensso.nippy/extend-thaw)]}
;; TODO (Cam 8/22/25) -- what's the point of marking stuff deprecated if we don't have Kondo enforce it? We should
;; remove all of these and add individual ignores as needed.
:deprecated-var
{:exclude
{metabase.cmd.core/dump {:namespaces ["metabase\\.cmd-test" "metabase-enterprise\\.serialization\\.cmd-test"]}
metabase.cmd.core/load {:namespaces ["metabase\\.cmd-test" "metabase-enterprise\\.serialization\\.cmd-test"]}
metabase.driver.sql-jdbc.execute.old-impl/set-timezone-sql {:namespaces ["metabase\\.driver.*"]}
metabase.driver.sql-jdbc.execute/set-time-zone-if-supported! {:namespaces ["metabase\\.driver.*"]}
metabase.driver/current-db-time {:namespaces ["metabase.*"]}
metabase.driver/supports? {:namespaces ["metabase.*"]}
metabase.query-processor.middleware.resolve-joins/maybe-resolve-source-table {:namespaces ["metabase.*"]}
metabase.query-processor.util/normalize-token {:namespaces ["metabase.*"]}}}
{metabase.driver.sql-jdbc.execute.old-impl/set-timezone-sql {:namespaces ["metabase\\.driver.*"]}
metabase.driver.sql-jdbc.execute/set-time-zone-if-supported! {:namespaces ["metabase\\.driver.*"]}
metabase.driver/current-db-time {:namespaces ["metabase.*"]}
metabase.driver/supports? {:namespaces ["metabase.*"]}
metabase.query-processor.util/normalize-token {:namespaces ["metabase.*"]}}}
:discouraged-var
{clojure.core/print {:message "Use metabase.util.log instead of clojure.core/print"}
@@ -273,6 +274,7 @@
clojure.java.jdbc/with-db-connection {:message "Use sql-jdbc.execute/do-with-connection-with-options (for drivers) or t2/with-connection (for the app DB) instead of jdbc/with-db-connection"}
clojure.java.jdbc/with-db-metadata {:message "Use sql-jdbc.execute/do-with-connection-with-options + .getMetaData instead of jdbc/with-db-metadata"}
clojure.pprint/pprint {:message "Use metabase.util.log instead of clojure.pprint/pprint"}
clojure.pprint/print-table {:message "Use metabase.util.log instead of printing directly to the console"}
clojure.string/lower-case {:message "Use metabase.util/lower-case-en instead of clojure.string/lower-case"}
clojure.string/upper-case {:message "Use metabase.util/upper-case-en instead of clojure.string/upper-case"}
compojure.core/context {:message "Use metabase.api.util.handlers/route-map-handler instead of compojure.core/context, it is much faster and supports OpenAPI spec generation"}
@@ -291,6 +293,8 @@
me.flowthing.pp/pprint {:message "Use metabase.util.log instead of me.flowthing.pp/pprint"}
medley.core/random-uuid {:message "Use clojure.core/random-uuid instead of medley.core/random-uuid"}
metabase.driver/database-supports? {:message "Use metabase.driver.util/supports? instead of metabase.driver/database-supports?"}
metabase.lib.convert/->legacy-MBQL {:message "Conversion to legacy MBQL is discouraged, please use Lib to manipulate MBQL queries"}
metabase.lib.core/->legacy-MBQL {:message "Conversion to legacy MBQL is discouraged, please use Lib to manipulate MBQL queries"}
metabase.lib.equality/find-column-indexes-for-refs {:message "Use lib.equality/closest-matches-in-metadata or lib.equality/find-closest-matches-for-refs instead of lib.equality/find-column-indexes-for-refs"}
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"}
@@ -299,6 +303,7 @@
:discouraged-namespace
{camel-snake-kebab.core {:message "CSK is not Turkish-safe, use the versions in metabase.util instead."}
cheshire.core {:message "Use metabase.util.json instead of cheshire.core directly."}
clj-time.core {:message "Use java-time.api or metabase.util.date-2 instead of clj-time"}
clojure.tools.logging {:message "Use metabase.util.log instead of clojure.tools.logging directly"}
grouper.core {:message "Use metabase.util.grouper instead of grouper.core"}
honeysql.core {:message "Use Honey SQL 2. Honey SQL 1 is removed as a dependency in Metabase 49+."}
@@ -407,10 +412,16 @@
clojure.test.check.clojure-test/defspec clojure.test/deftest
clojure.test.check.properties/for-all clojure.core/let
clojurewerkz.quartzite.jobs/defjob clojure.core/defn
com.climate.claypoole/with-shutdown! clojure.core/let
instaparse.core/defparser clojure.core/def
metabase-enterprise.action-v2.test-util/with-test-tables! clojure.core/let
metabase-enterprise.content-translation.routes-test/with-new-secret-key! clojure.core/fn
metabase-enterprise.serialization.test-util/with-dbs clojure.core/fn
metabase-enterprise.serialization.test-util/with-random-dump-dir clojure.core/let
metabase-enterprise.content-translation.routes-test/with-new-secret-key! clojure.core/fn
metabase-enterprise.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.actions.test-util/with-actions clojure.core/let
metabase.api.common/let-404 clojure.core/let
metabase.app-db.custom-migrations.util/with-temp-scheduler! clojure.core/fn
@@ -469,6 +480,7 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.test/with-temp-file clojure.core/let
metabase.test/with-user-in-groups clojure.core/let
metabase.upload.impl-test/with-upload-table! clojure.core/let
metabase.util/for-map clojure.core/for
metabase.util.files/with-open-path-to-resource clojure.core/let
metabase.util.malli.defn/defn schema.core/defn
metabase.util.malli.defn/defn- schema.core/defn
@@ -478,8 +490,9 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.util.malli/defn- schema.core/defn
metabase.util.malli/fn schema.core/fn
metabase.util.namespaces/import-fns potemkin/import-vars
metabase.util.performance/doseq clojure.core/doseq
metabase.util.performance/for clojure.core/for
metabase.util/with-timer-ms clojure.core/fn
metabase.xrays.domain-entities.malli/defn schema.core/defn
metabuild-common.core/with-open-jar-file-system clojure.core/let
metabuild-common.files/with-open-jar-file-system clojure.core/let
monger.operators/defoperator clojure.core/def
@@ -501,6 +514,7 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
clojure.core/ns hooks.clojure.core.ns/lint-ns
clojure.core/require hooks.clojure.core.require/lint-require
clojure.core/requiring-resolve hooks.clojure.core.require/lint-requiring-resolve
clojure.core/- hooks.metabase.util.timing/discourage-millis-duration
clojure.test/deftest hooks.clojure.test/deftest
clojure.test/is hooks.clojure.test/is
clojure.test/use-fixtures hooks.clojure.test/use-fixtures
@@ -508,7 +522,10 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase-enterprise.advanced-permissions.models.permissions.application-permissions-test/with-new-group-and-current-graph hooks.common/with-two-top-level-bindings
metabase-enterprise.audit-app.pages-test/with-temp-objects hooks.common/with-one-binding
metabase-enterprise.cache.config-test/with-temp-persist-models hooks.common/with-seven-bindings
metabase-enterprise.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.test-util/with-temp-dpc hooks.toucan2.tools.with-temp/with-temp
metabase-enterprise.transforms-python.drivers-test/with-test-table hooks.common/with-two-bindings
metabase.api.common.internal-test/with-jetty-server hooks.common/with-one-binding
metabase.api.macros/defendpoint hooks.metabase.api.macros/defendpoint
metabase.app-db.schema-migrations-test.impl/test-migrations hooks.metabase.app-db.schema-migrations-test.impl/test-migrations
@@ -539,6 +556,7 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.lib.schema.mbql-clause/define-tuple-mbql-clause hooks.metabase.lib.schema.mbql-clause/define-mbql-clause
metabase.lib.test-util.macros/$ids hooks.metabase.test.data/$ids
metabase.lib.test-util.macros/mbql-query hooks.metabase.test.data/mbql-query
metabase.lib.test-util.macros/mbql-5-query hooks.metabase.test.data/mbql-query
metabase.lib.test-util.macros/with-testing-against-standard-queries hooks.metabase.lib.test-util.macros/with-testing-against-standard-queries
metabase.model-persistence.api-test/with-persistence-setup! hooks.common/with-one-top-level-binding
metabase.model-persistence.api-test/with-setup! hooks.common/with-one-top-level-binding
@@ -559,8 +577,8 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.pulse.models.pulse-test/with-pulse-in-collection! hooks.common/with-four-bindings
metabase.pulse.test-util/checkins-query-card hooks.metabase.test.data/$ids
metabase.queries.api.card-test/with-card-param-values-fixtures hooks.common/let-one-with-optional-value
metabase.queries.api.card-test/with-temp-native-card! hooks.common/with-two-bindings
metabase.queries.api.card-test/with-temp-native-card-with-params! hooks.common/with-two-bindings
metabase.queries.api.card-test/with-temp-native-card hooks.common/with-two-bindings
metabase.queries.api.card-test/with-temp-native-card-with-params hooks.common/with-two-bindings
metabase.query-processor-test.expressions-test/calculate-bird-scarcity hooks.metabase.query-processor-test.expressions-test/calculate-bird-scarcity
metabase.query-processor-test.filter-test/count-with-filter-clause hooks.metabase.test.data/$ids
metabase.query-processor.middleware.cache-test/with-mock-cache! hooks.common/with-two-bindings
@@ -610,10 +628,11 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.test/with-non-admin-groups-no-root-collection-perms hooks.common/do*
metabase.test/with-persistence-enabled! hooks.metabase.model-persistence.test-util/with-persistence-enabled!
metabase.test/with-prometheus-system! hooks.common/with-two-bindings
metabase.test/with-random-premium-token! hooks.common/with-one-binding
metabase.test/with-temp hooks.toucan2.tools.with-temp/with-temp
metabase.test/with-temp-file hooks.metabase.test.util/with-temp-file
metabase.test/with-temporary-setting-values hooks.metabase.test.util/with-temporary-setting-values
metabase.users.api-test/with-temp-user-email! hooks.common/with-one-binding
metabase.users.api-test/with-temp-user-email! hooks.common/with-one-binding
metabase.util.i18n/deferred-trs hooks.metabase.util.i18n/deferred-trs
metabase.util.i18n/deferred-tru hooks.metabase.util.i18n/deferred-tru
metabase.util.i18n/trs hooks.metabase.util.i18n/trs
@@ -638,6 +657,7 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
:macroexpand
{clojurewerkz.quartzite.jobs/build macros.quartz/build-job
clojurewerkz.quartzite.schedule.calendar-interval/build macros.quartz/build-job
clojurewerkz.quartzite.schedule.cron/schedule macros.quartz/schedule
clojurewerkz.quartzite.schedule.simple/schedule macros.quartz/simple-schedule
clojurewerkz.quartzite.triggers/build macros.quartz/build-trigger
@@ -672,7 +692,6 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
metabase.test/with-temporary-raw-setting-values macros.metabase.test.util/with-temporary-raw-setting-values
metabase.users.models.user-test/with-groups! macros.metabase.users.models.user-test/with-groups!
metabase.util.namespaces/import-fn macros.metabase.util.namespaces/import-fn
metabase.xrays.domain-entities.malli/define-getters-and-setters macros.metabase.xrays.domain-entities.malli/define-getters-and-setters
metabase.xrays.related-test/with-world macros.metabase.xrays.related-test/with-world}}
:config-in-comment
@@ -700,18 +719,30 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
:name metabase-lib}
{:pattern "^metabase\\.lib\\..*"
:name metabase-lib-excluding-legacy-mbql}
{:pattern "^metabase\\.legacy-mbql\\..*"
:name legacy-mbql-namespaces}
;;
;; QP source namespaces: `metabase.query-processor.*`, `metabase-enterprise.sandbox.query-processor.*`, and
;; `metabase.driver.*`, excluding `-test` namespaces.
;; QP and driver source namespaces: `metabase.query-processor.*`, `metabase-enterprise.sandbox.query-processor.*`,
;; and `metabase.driver.*`, excluding `-test` namespaces.
;;
{:pattern "metabase(?:(?:(?:-enterprise\\.sandbox)?\\.query-processor\\.)|(?:\\.driver\\.)).*(?<!-test)$"
:name qp-and-driver-source-namespaces}
;;
;; driver namespaces
;; QP source namespaces
;;
{:pattern "metabase\\.driver.*$"
{:pattern "metabase(?:(?:-enterprise\\.sandbox)?\\.query-processor\\.).*(?<!-test)$"
:name qp-source-namespaces}
;;
;; driver namespaces, including tests
;;
{:pattern "metabase\\.driver(?:-api)?.*$"
:name driver-namespaces}
;;
;; Perf-sensitive namespaces are currently the union of metabase.lib.*, driver namespaces, and QP (without tests).
;;
{:pattern "^(?!.*-test(?:\\..*)?$)(?!.*test-util)(?!^metabase\\.test.*)^metabase\\.(lib|driver|legacy-mbql|query-processor).*"
:name performance-sensitive}
;;
;; general QP tests are ones that run across multiple drivers. Anything `metabase.query-processor*-test`,
;; `metabase.driver.sql*-test` (excluding SQLServer and SQLite), or
;; `metabase-enterprise.sandbox.query-processor*-test`
@@ -725,9 +756,13 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
{:inline-def {:level :off}
:missing-docstring {:level :off}
:private-call {:level :off}
:discouraged-var {metabase.driver/database-supports? {:level :off}}
:metabase/defsetting-must-specify-export {:level :off}
:metabase/defsetting-namespace {:level :off}}
:metabase/defsetting-namespace {:level :off}
: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
@@ -739,9 +774,21 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
{:linters
{:metabase/validate-escaped-single-quotes-in-i18n {:level :warning}
:metabase/validate-string-or-str-args-to-i18n {:level :warning}
:metabase/discourage-millis-duration {:level :warning}
:discouraged-var
{clojure.core/with-redefs {:message "Don't use with-redefs outside of tests"}
clojure.core/eval {:message "Don't use eval outside of tests"}}}}
clojure.core/eval {:message "Don't use eval outside of tests"}}
:discouraged-namespace
{metabase.legacy-mbql.jvm-util {:message "Avoid legacy MBQL utils, use Lib instead"}
metabase.legacy-mbql.normalize {:message "Avoid legacy MBQL normalization, use MBQL 5 + lib/normalize instead"}
metabase.legacy-mbql.predicates {:message "Avoid legacy MBQL utils, use Lib instead"}
metabase.legacy-mbql.schema {:message "Avoid the legacy MBQL schema, use MBQL 5 + lib.schema instead"}
metabase.legacy-mbql.schema.helpers {:message "Avoid the legacy MBQL schema, use MBQL 5 + lib.schema instead"}
metabase.legacy-mbql.schema.macros {:message "Avoid the legacy MBQL schema, use MBQL 5 + lib.schema instead"}
metabase.legacy-mbql.util {:message "Avoid legacy MBQL utils, use Lib instead"}
metabase.query-processor.store {:message "Please do not use the QP Store outside of legacy QP or driver code. Use MBQL 5/Lib or lib.metadata.jvm/applicaton-database-metadata-provider instead."}}}}
printable-namespaces
{:linters
@@ -753,7 +800,7 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
clojure.string/lower-case {:level :off}
clojure.string/upper-case {:level :off}}}}
;; enable all the extra linters we haven't enabled in the core app yet in MLv2. It's all new code so we can adhere
;; enable all the extra linters we haven't enabled in the core app yet in Lib. It's all new code so we can adhere
;; to the new stricter rules from day 1
metabase-lib
{:linters
@@ -766,45 +813,130 @@ metabase-enterprise.content-translation.routes-test/with-new-secret-key!
;; eventually we should do this for the whole codebase, but the args are in the opposite order so switching them
;; all at once isn't trivial, at least we can stop using it in new code.
:discouraged-var
{medley.core/map-keys {:message "Use clojure.core/update-keys"}
medley.core/map-vals {:message "Use clojure.core/update-vals"}
metabase.test/with-temp {:message "Don't use application database inside MLv2 code"}}
{medley.core/map-keys {:message "Use metabase.util.performance/update-keys"}
medley.core/map-vals {:message "Use clojure.core/update-vals"}
metabase.lib.convert/->legacy-MBQL {:level :off}
metabase.lib.core/->legacy-MBQL {:level :off}
metabase.test/with-temp {:message "Don't use application database inside Lib code"}}
:discouraged-namespace
{metabase.driver {:message "MLv2 code should be independent of driver code/methods"}
metabase.test {:message "MLv2 tests should only use MLv2 test helpers"}
metabase.test.data {:message "MLv2 tests should only use MLv2 test helpers"}
metabase.util.malli.schema {:message "Prefer metabase.lib.schema schemas in MLv2 code"}
toucan.db {:message "Don't use application database inside MLv2 code"}
toucan.models {:message "Don't use application database inside MLv2 code"}
toucan.util.test {:message "Don't use application database inside MLv2 code"}
toucan2.core {:message "Don't use application database inside MLv2 code"}}}}
{metabase.driver {:message "Lib code should be independent of driver code/methods"}
metabase.test {:message "Lib tests should only use Lib test helpers"}
metabase.test.data {:message "Lib tests should only use Lib test helpers"}
metabase.util.malli.schema {:message "Prefer metabase.lib.schema schemas in Lib code"}
toucan.db {:message "Don't use application database inside Lib code"}
toucan.models {:message "Don't use application database inside Lib code"}
toucan.util.test {:message "Don't use application database inside Lib code"}
toucan2.core {:message "Don't use application database inside Lib code"}}}}
metabase-lib-excluding-legacy-mbql
{}
legacy-mbql-namespaces
{:linters
{:discouraged-var
{metabase.legacy-mbql.util/unique-name-generator {:message "Use metabase.lib.util/unique-name-generator or non-truncating-unique-name-generator"}}}}
{:discouraged-namespace
{metabase.legacy-mbql.jvm-util {:level :off}
metabase.legacy-mbql.normalize {:level :off}
metabase.legacy-mbql.predicates {:level :off}
metabase.legacy-mbql.schema {:level :off}
metabase.legacy-mbql.schema.helpers {:level :off}
metabase.legacy-mbql.schema.macros {:level :off}
metabase.legacy-mbql.util {:level :off}
metabase.query-processor.store {:level :off}}
;; the `metabase.legacy-mbql` stuff is all deprecated, so we don't need to warn inside the module about other stuff
;; in the module being marked deprecated or discouraged.
:deprecated-namespace {:level :off}
:deprecated-var {:level :off}}}
driver-namespaces
{:linters
{:discouraged-var
{metabase.driver/database-supports? {:level :off}}}}
{metabase.driver/database-supports? {:level :off}}
;; don't warn about the legacy MBQL namespaces being deprecated or discouraged in driver code now, we don't have a
;; real alternative YET so it's not a helpful warning.
:discouraged-namespace
{metabase.legacy-mbql.jvm-util {:level :off}
metabase.legacy-mbql.normalize {:level :off}
metabase.legacy-mbql.predicates {:level :off}
metabase.legacy-mbql.schema {:level :off}
metabase.legacy-mbql.schema.helpers {:level :off}
metabase.legacy-mbql.schema.macros {:level :off}
metabase.legacy-mbql.util {:level :off}
metabase.query-processor.store {:level :off}}
:deprecated-namespace
{:exclude
[metabase.driver.common.parameters
metabase.driver.common.parameters.dates
metabase.driver.common.parameters.operators
metabase.driver.common.parameters.parse
metabase.driver.common.parameters.values
metabase.legacy-mbql.jvm-util
metabase.legacy-mbql.normalize
metabase.legacy-mbql.predicates
metabase.legacy-mbql.schema
metabase.legacy-mbql.schema.helpers
metabase.legacy-mbql.schema.macros
metabase.legacy-mbql.util
metabase.query-processor.store]}
:deprecated-var
{:exclude
{metabase.legacy-mbql.schema.helpers/is-clause? {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.schema.helpers/mbql-clause? {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/query->source-table-id {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/aggregation-at-index {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/assoc-field-options {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/expression-with-name {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/field-options {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/negate-filter-clause {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/normalize-token {:namespaces ["metabase\\.driver.*"]}
metabase.legacy-mbql.util/update-field-options {:namespaces ["metabase\\.driver.*"]}}}}}
performance-sensitive
{:linters
{:discouraged-var
{clojure.core/every? {:message "Use metabase.util.performance/every?"}
clojure.core/mapv {:message "Use metabase.util.performance/mapv"}
clojure.core/run! {:message "Use metabase.util.performance/run!"}
clojure.core/select-keys {:message "Use metabase.util.performance/select-keys"}
clojure.core/some {:message "Use metabase.util.performance/some"}
clojure.core/update-keys {:message "Use metabase.util.performance/update-keys"}
clojure.walk/keywordize-keys {:message "Use metabase.util.performance/keywordize-keys"}
clojure.walk/postwalk {:message "Use metabase.util.performance/postwalk"}
clojure.walk/prewalk {:message "Use metabase.util.performance/prewalk"}
clojure.walk/walk {:message "Use metabase.util.performance/walk"}}}}
qp-and-driver-source-namespaces
{:linters
{:discouraged-namespace
{metabase.util.malli.schema {:message "Prefer metabase.lib.schema or metabase.legacy-mbql.schema schemas in QP/driver code"}
toucan.db {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}
toucan.models {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}
toucan.util.test {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}
toucan2.core {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}}
{metabase.query-processor.store {:level :off}
metabase.util.malli.schema {:message "Prefer metabase.lib.schema or metabase.legacy-mbql.schema schemas in QP/driver code"}
toucan.db {:message "Don't use application database directly in QP code; use the MetadataProvider"}
toucan.models {:message "Don't use application database directly in QP code; use the MetadataProvider"}
toucan.util.test {:message "Don't use application database directly in QP code; use the MetadataProvider"}
toucan2.core {:message "Don't use application database directly in QP code; use the MetadataProvider"}}
:discouraged-var
{medley.core/map-keys {:message "Use clojure.core/update-keys"}
{medley.core/map-keys {:message "Use metabase.util.performance/update-keys"}
medley.core/map-vals {:message "Use clojure.core/update-vals"}
metabase.app-db.core/query {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}
metabase.app-db.core/reducible-query {:message "Don't use application database directly in QP code; use QP Store/metadata provider"}}}}
metabase.app-db.core/query {:message "Don't use application database directly in QP code; use the MetadataProvider"}
metabase.app-db.core/reducible-query {:message "Don't use application database directly in QP code; use the MetadataProvider"}
metabase.lib.convert/->legacy-MBQL {:level :off}
metabase.lib.core/->legacy-MBQL {:level :off}}}}
qp-source-namespaces
{}
general-qp-and-driver-test-namespaces
{:linters
{:metabase/disallow-hardcoded-driver-names-in-tests {:level :warning}}}}}
{:discouraged-var
{metabase.test/with-column-remappings {:message "Use lib.tu/remap-metadata-provider instead of with-column-remappings in QP tests"}
metabase.test.util/with-column-remappings {:message "Use lib.tu/remap-metadata-provider instead of with-column-remappings in QP tests"}
metabase.test/with-temp {:message "Use lib.tu/mock-metadata-provider in QP tests. Exceptions: tests for code that doesn't use MPs or models not supported by MPs"}
toucan2.tools.with-temp/with-temp {:message "Use lib.tu/mock-metadata-provider in QP tests. Exceptions: tests for code that doesn't use MPs or models not supported by MPs"}}
:metabase/disallow-hardcoded-driver-names-in-tests
{:level :warning}}}}}

File diff suppressed because it is too large Load Diff

View File

@@ -13,7 +13,10 @@
toucan2.core/insert-returning-pk!
toucan2.core/insert-returning-pks!
clojure.core.async/<!!
clojure.core.async/<!
clojure.core.async/>!!
clojure.core.async/>!
clojure.core.async/alts!
clojure.core.async/alts!!
clojure.core.async/close!
clojure.core.async/poll!

View File

@@ -1,16 +0,0 @@
(ns macros.metabase.xrays.domain-entities.malli)
(defmacro define-getters-and-setters [schema & defs]
`(do
(comment ~schema) ;; Reference the schema
~@(for [[sym _path] (partition 2 defs)]
`(do
(defn ~(vary-meta sym
assoc :export true)
"docs" [_x#] nil)
(defn ~(vary-meta (symbol (str "with-" (name sym)))
assoc :export true)
"docs" [x# _new#] x#)
(defn ~(vary-meta (symbol (str (name sym) "-js"))
assoc :export true)
"docs" [x#] x#)))))

View File

@@ -52,7 +52,13 @@
(defn- lint-require* [node current-ns config]
(let [[_require & args] (:children node)
required-namespaces (keep unwrap-require args)]
required-namespaces (->> (keep unwrap-require args)
;; `require` runs through `cc/load-libs` which allows
;; #{:as :reload :reload-all :require :use :verbose :refer :as-alias}
;; as args. If you use a REPL tool that applies clj-kondo linting (e.g., Clojure MCP)
;; you may wish to `:reload` or `:reload-all` a namespace. So we shouldn't assume all
;; args are keywords:
(remove keyword?))]
(lint* node current-ns config required-namespaces)))
(defn- lint-requiring-resolve* [node current-ns config]

View File

@@ -1,6 +1,6 @@
(ns hooks.metabase.test.util
(:require [clj-kondo.hooks-api :as hooks]
[hooks.common :as common]))
(:require
[clj-kondo.hooks-api :as hooks]))
(defn- namespaced-symbol-node? [node]
(when (hooks/token-node? node)

View File

@@ -0,0 +1,16 @@
(ns hooks.metabase.util.timing
"Custom CLJ Kondo hooks for timing-related linting rules."
(:require [clj-kondo.hooks-api :as api]))
(defn discourage-millis-duration
"Discourage slow and unreliable duration calculations using System/currentTimeMillis "
[{:keys [node]}]
(let [sexpr (api/sexpr node)]
(when (and (list? sexpr) (= (first sexpr) '-) (>= (count sexpr) 2))
(let [first-arg (second sexpr)]
(when (= first-arg (list 'System/currentTimeMillis))
(api/reg-finding!
(assoc (meta node)
:message "Avoid System/currentTimeMillis for calculating durations. Use u/start-timer and u/since-ms for more reliability."
:type :metabase/discourage-millis-duration
:level :warning)))))))

View File

@@ -152,6 +152,7 @@
metabase.lib.join/with-join-alias [[:default]]
metabase.lib.join/with-join-conditions [[:default]]
metabase.lib.test-util.macros/$ids [[:inner 0]]
metabase.lib.test-util.macros/mbql-5-query [[:inner 0]]
metabase.lib.test-util.macros/mbql-query [[:inner 0]]
metabase.lib.util.match/match [[:inner 0]]
metabase.lib.util.match/match-one [[:inner 0]]
@@ -162,8 +163,8 @@
metabase.models.interface/define-batched-hydration-method [[:inner 0]]
metabase.models.interface/define-simple-hydration-method [[:inner 0]]
metabase.parameters.chain-filter-test/with-clean-field-values-for-field [[:block 1]]
metabase.parameters.chain-filter-test/with-fk-field-to-field-remapping [[:block 0]]
metabase.parameters.chain-filter-test/with-human-readable-values-remapping [[:block 0]]
metabase.parameters.chain-filter-test/with-fk-field-to-field-remapping! [[:block 0]]
metabase.parameters.chain-filter-test/with-human-readable-values-remapping! [[:block 0]]
metabase.permissions.core/allow-changing-all-users-group-members [[:block 0]]
metabase.permissions.core/disable-perms-cache [[:block 0]]
metabase.public-sharing.api-test/with-sharing-enabled-and-temp-card-referencing [[:block 3]]
@@ -178,8 +179,8 @@
metabase.queries.api.card-test/with-cards-in-readable-collection [[:block 1]]
metabase.queries.api.card-test/with-cards-in-writeable-collection [[:block 1]]
metabase.queries.api.card-test/with-ordered-items [[:inner 0]]
metabase.queries.api.card-test/with-temp-native-card! [[:block 1]]
metabase.queries.api.card-test/with-temp-native-card-with-params! [[:block 1]]
metabase.queries.api.card-test/with-temp-native-card [[:block 1]]
metabase.queries.api.card-test/with-temp-native-card-with-params [[:block 1]]
metabase.query-processor-test.pipeline-queries-test/pmbql-query [[:block 1]]
metabase.query-processor-test.pipeline-queries-test/run-pmbql-query [[:block 1]]
metabase.query-processor.debug/debug> [[:block 0]]
@@ -231,7 +232,6 @@
metabase.test.data/$ids [[:inner 0]]
metabase.test.data/dataset [[:inner 0]]
metabase.test.data/mbql-query [[:inner 0]]
metabase.test.data/native-query [[:block 0]]
metabase.test.data/query [[:block 1]]
metabase.test.data/run-mbql-query [[:inner 0]]
metabase.test.data/with-empty-h2-app-db! [[:block 0]]
@@ -252,7 +252,6 @@
metabase.test/format-rows-by [[:default]]
metabase.test/let-url [[:block 1]]
metabase.test/mbql-query [[:inner 0]]
metabase.test/native-query [[:block 0]]
metabase.test/query [[:block 1]]
metabase.test/run-mbql-query [[:inner 0]]
metabase.test/test-driver [[:inner 0]]
@@ -284,6 +283,7 @@
metabase.upload.impl-test/with-upload-table! [[:inner 0]]
metabase.upload.types/with-currency [[:default]]
metabase.upload.types/with-parens [[:default]]
metabase.util/for-map [[:block 1]]
metabase.util.async/cancelable-thread [[:block 0]]
metabase.util.date-2/with-time-zone-same-instant [[:default]]
metabase.util.encryption-test/with-secret-key [[:block 1]]

View File

@@ -4,7 +4,6 @@ FROM mcr.microsoft.com/vscode/devcontainers/java:21
RUN ( curl -fsSL https://deb.nodesource.com/setup_22.x | bash ) \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-key adv --refresh-keys --keyserver keyserver.ubuntu.com \
&& apt-get update && apt-get -y install --no-install-recommends nodejs yarn rlwrap fontconfig
# install Clojure

View File

@@ -1,5 +1,4 @@
.babel_cache
docs/*
target/*
.circleci
.cpcache

View File

@@ -1,6 +1,8 @@
/* 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
@@ -12,6 +14,7 @@ if (shouldLintCssModules) {
}
module.exports = {
ignorePatterns: ["!.storybook"],
rules: {
strict: [2, "never"],
"no-undef": 2,
@@ -46,6 +49,7 @@ module.exports = {
],
curly: [1, "all"],
eqeqeq: [1, "smart"],
"import/no-duplicates": ["warn", { considerQueryString: true }],
"import/no-default-export": 2,
"import/no-named-as-default": 0,
"import/no-commonjs": 1,
@@ -132,7 +136,7 @@ module.exports = {
},
env: {
browser: true,
es6: true,
es2020: true,
commonjs: true,
jest: true,
"jest/globals": true,
@@ -155,6 +159,7 @@ module.exports = {
"import/internal-regex": "^metabase/|^metabase-lib/",
"import/resolver": {
webpack: {
config: path.resolve(__dirname, "./rspack.main.config.js"),
typescript: true,
},
},
@@ -175,6 +180,7 @@ module.exports = {
{
files: ["*.js", "*.jsx", "*.ts", "*.tsx"],
rules: {
"jtag-missing-key": "error",
"no-unconditional-metabase-links-render": "error",
"no-color-literals": "error",
"no-literal-metabase-strings": "error",
@@ -197,14 +203,18 @@ module.exports = {
"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/**/*",
"webpack.config.js",
"rspack.config.js",
"rspack.main.config.js",
"rspack.embedding-sdk-package.config.js",
"rspack.embedding-sdk-bundle.config.js",
],
rules: {
"no-color-literals": "off",
@@ -221,8 +231,7 @@ module.exports = {
"e2e/**/*",
"**/tests/*",
"release/**/*",
"webpack.config.js",
"rspack.config.js",
"rspack.main.config.js",
],
rules: {
"i18next/no-literal-string": "off",
@@ -333,5 +342,11 @@ module.exports = {
"no-color-literals": "off",
},
},
{
files: ["frontend/build/**/*.js"],
rules: {
"import/no-commonjs": "off",
},
},
],
};

50
.github/CODEOWNERS vendored
View File

@@ -1,11 +1,13 @@
# Before changing this file, make sure you have read how we use it:
# https://www.notion.so/metabase/Pull-Request-Code-Review-Guide-374f05df889748b69d67af753f9bc9b8?pvs=4#36550c04ceab40b5a8b8bee6264b090c
enterprise/frontend/src/embedding-sdk @metabase/embedding
enterprise/frontend/src/embedding-sdk-package @metabase/embedding
enterprise/frontend/src/embedding-sdk-bundle @metabase/embedding
enterprise/frontend/src/embedding-sdk-shared @metabase/embedding
frontend/src/metabase/embedding-sdk @metabase/embedding
frontend/src/metabase/public/containers/PublicOrEmbeddedQuestion @metabase/embedding
frontend/src/metabase/public/containers/PublicOrEmbeddedDashboard @metabase/embedding
frontend/src/metabase/ui @metabase/core-frontend-admin-webapp
frontend/src/metabase/ui @metabase/core-frontend-ux-west
# snowplow/* @metabase/data
src/metabase/analytics/prometheus.clj @metabase/cloud-ops
.github @metabase/devexp
@@ -20,8 +22,8 @@ docs/developers-guide # exclude from tech-writer ownership
#
# modules/drivers @metabase/drivers
src/metabase/driver/sql_jdbc/actions.clj @metabase/core-workflows
test/metabase/driver/sql_jdbc/actions_test.clj @metabase/core-workflows
src/metabase/driver/sql_jdbc/actions.clj @metabase/core-ux-east
test/metabase/driver/sql_jdbc/actions_test.clj @metabase/core-ux-east
# enterprise/backend/src/metabase_enterprise/advanced_config @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/advanced_config @metabase/core-backend-admin-webapp
@@ -53,8 +55,8 @@ test/metabase/driver/sql_jdbc/actions_test.clj @metabase/core-workflows
# enterprise/backend/src/metabase_enterprise/core @metabase/devexp
# enterprise/backend/test/metabase_enterprise/core @metabase/devexp
# enterprise/backend/src/metabase_enterprise/dashboard_subscription_filters @metabase/core-workflows
# enterprise/backend/test/metabase_enterprise/dashboard_subscription_filters @metabase/core-workflows
# enterprise/backend/src/metabase_enterprise/dashboard_subscription_filters @metabase/core-ux-east
# enterprise/backend/test/metabase_enterprise/dashboard_subscription_filters @metabase/core-ux-east
# enterprise/backend/src/metabase_enterprise/enhancements @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/enhancements @metabase/core-backend-admin-webapp
@@ -71,11 +73,11 @@ test/metabase/driver/sql_jdbc/actions_test.clj @metabase/core-workflows
# enterprise/backend/src/metabase_enterprise/scim @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/scim @metabase/core-backend-admin-webapp
# enterprise/backend/src/metabase_enterprise/search @metabase/core-workflows
# enterprise/backend/test/metabase_enterprise/search @metabase/core-workflows
# enterprise/backend/src/metabase_enterprise/search ...
# enterprise/backend/test/metabase_enterprise/search ...
# enterprise/backend/src/metabase_enterprise/serialization @metabase/core-workflows
# enterprise/backend/test/metabase_enterprise/serialization @metabase/core-workflows
# enterprise/backend/src/metabase_enterprise/serialization @metabase/core-ux-east
# enterprise/backend/test/metabase_enterprise/serialization @metabase/core-ux-east
# enterprise/backend/src/metabase_enterprise/snippet_collections @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/snippet_collections @metabase/core-backend-admin-webapp
@@ -95,8 +97,8 @@ test/metabase/driver/sql_jdbc/actions_test.clj @metabase/core-workflows
# enterprise/backend/src/metabase_enterprise/upload_management @metabase/core-backend-admin-webapp
# enterprise/backend/test/metabase_enterprise/upload_management @metabase/core-backend-admin-webapp
src/metabase/actions @metabase/core-backend-admin-webapp
test/metabase/actions @metabase/core-backend-admin-webapp
src/metabase/actions @metabase/core-ux-east
test/metabase/actions @metabase/core-ux-east
# src/metabase/activity_feed @metabase/core-backend-admin-webapp
# test/metabase/activity_feed @metabase/core-backend-admin-webapp
@@ -122,11 +124,11 @@ test/metabase/actions @metabase/core-backend-admin-webapp
# src/metabase/cmd @metabase/devexp
# test/metabase/cmd @metabase/devexp
# src/metabase/channel @metabase/core-workflows
# test/metabase/channel @metabase/core-workflows
# src/metabase/channel @metabase/core-ux-east
# test/metabase/channel @metabase/core-ux-east
# src/metabase/cloud_migration @metabase/core-workflows
# test/metabase/cloud_migration @metabase/core-workflows
# src/metabase/cloud_migration ...
# test/metabase/cloud_migration ...
# src/metabase/cmd @metabase/devexp
# test/metabase/cmd @metabase/devexp
@@ -158,8 +160,8 @@ test/metabase/actions @metabase/core-backend-admin-webapp
# src/metabase/indexed_entities @metabase/core-backend-querying
# test/metabase/indexed_entities @metabase/core-backend-querying
# src/metabase/integrations @metabase/core-workflows
# test/metabase/integrations @metabase/core-workflows
# src/metabase/integrations ...
# test/metabase/integrations ...
# src/metabase/legacy_mbql @metabase/core-backend-querying
# test/metabase/legacy_mbql @metabase/core-backend-querying
@@ -182,8 +184,8 @@ test/metabase/actions @metabase/core-backend-admin-webapp
# src/metabase/moderation @metabase/core-backend-admin-webapp
# test/metabase/moderation @metabase/core-backend-admin-webapp
# src/metabase/notification @metabase/core-workflows
# test/metabase/notification @metabase/core-workflows
# src/metabase/notification @metabase/core-ux-east
# test/metabase/notification @metabase/core-ux-east
# src/metabase/permissions @metabase/core-backend-admin-webapp
# test/metabase/permissions @metabase/core-backend-admin-webapp
@@ -200,8 +202,8 @@ test/metabase/actions @metabase/core-backend-admin-webapp
# src/metabase/public_sharing @metabase/core-backend-admin-webapp
# test/metabase/public_sharing @metabase/core-backend-admin-webapp
# src/metabase/pulse @metabase/core-workflows
# test/metabase/pulse @metabase/core-workflows
# src/metabase/pulse @metabase/core-ux-east
# test/metabase/pulse @metabase/core-ux-east
# src/metabase/query_analysis @metabase/core-backend-querying
# test/metabase/query_analysis @metabase/core-backend-querying
@@ -218,8 +220,8 @@ test/metabase/actions @metabase/core-backend-admin-webapp
# src/metabase/sample_data @metabase/core-backend-admin-webapp
# test/metabase/sample_data @metabase/core-backend-admin-webapp
# src/metabase/search @metabase/core-workflows
# test/metabase/search @metabase/core-workflows
# src/metabase/search ...
# test/metabase/search ...
# src/metabase/segments @metabase/core-backend-querying
# test/metabase/segments @metabase/core-backend-querying

View File

@@ -63,7 +63,8 @@ body:
attributes:
label: Information about your Metabase installation
description: |
Copy and paste the JSON from `Admin -> Troubleshooting`.
For versions >= 56, copy and paste the Diagnostic info from `Admin -> Tools -> Help`.
For versions < 56, copy and paste the Diagnostic info from `Admin -> Troubleshooting`.
_This will be automatically formatted into code, so no need for backticks._
placeholder: |
{"browser-info": {

View File

@@ -3,7 +3,7 @@
> **Warning**
>
> If that is your first contribution to Metabase, please sign the [Contributor License Agreement](https://docs.google.com/a/metabase.com/forms/d/1oV38o7b9ONFSwuzwmERRMi9SYrhYeOrkbmNaq9pOJ_E/viewform) (unless it's a tiny documentation change). Also, if you're attempting to fix a translation issue, please submit your changes to our [Crowdin project](https://crowdin.com/project/metabase-i18n) instead of opening a PR.
> If that is your first contribution to Metabase, please sign the [Contributor License Agreement](https://docs.google.com/a/metabase.com/forms/d/1oV38o7b9ONFSwuzwmERRMi9SYrhYeOrkbmNaq9pOJ_E/viewform). Also, if you're attempting to fix a translation issue, please submit your changes to our [Crowdin project](https://crowdin.com/project/metabase-i18n) instead of opening a PR.
Closes https://github.com/metabase/metabase/issues/[issue_number]

View File

@@ -1,4 +1,5 @@
name: Wait for localhost port to be ready
name: await-port
description: Wait for localhost port to be ready
inputs:
port:

View File

@@ -0,0 +1,36 @@
name: Cleanup Python Runner
description: Cleanup python-runner services and upload logs as artifacts
inputs:
upload-logs:
description: 'Whether to upload logs (typically on failure)'
required: false
default: 'false'
logs-artifact-suffix:
description: 'The unique name of the .zip artifact containing the logs'
required: false
default: ''
runs:
using: composite
steps:
- name: Cleanup python-runner services
if: always()
run: |
echo "Stopping python-runner services..."
if [ -d "python-runner" ]; then
cd python-runner
make stop || echo "WARNING: Failed to stop python runner"
fi
shell: bash
- name: Upload python-runner logs
if: ${{inputs.upload-logs == 'true' && inputs.logs-artifact-suffix != ''}}
uses: actions/upload-artifact@v4
with:
name: python-runner-logs-${{inputs.logs-artifact-suffix}}
path: |
python-runner.out.log
python-runner.err.log
retention-days: 1
if-no-files-found: warn

View File

@@ -74,7 +74,7 @@ runs:
git push -u origin ${BACKPORT_BRANCH}
BACKPORT_PR_URL=$(gh pr create --base "${TARGET_BRANCH}" --head "${BACKPORT_BRANCH}" --label "was-backported" --assignee "${GITHUB_ACTOR}" --title "🤖 backported \"${ORIGINAL_TITLE}\"" --body "${PR_BODY}")
BACKPORT_PR_URL=$(gh pr create --base "${TARGET_BRANCH}" --head "${BACKPORT_BRANCH}" --label "was-backported" --assignee "${{ github.event.pull_request.user.login }}" --title "🤖 backported \"${ORIGINAL_TITLE}\"" --body "${PR_BODY}")
BACKPORT_PR_NUMBER=${BACKPORT_PR_URL##*/}
echo "backport_pr_number=$BACKPORT_PR_NUMBER" >> $GITHUB_OUTPUT

View File

@@ -17,8 +17,6 @@ runs:
- name: Prepare backend environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: cross-branch-migrations
- name: Run backend on base branch
run: |

View File

@@ -5,6 +5,14 @@ inputs:
name:
description: The name of the artifact to fetch
required: true
output-name:
description: Optional custom name for the output jar file (defaults to metabase.jar)
required: false
default: "metabase.jar"
extract-path:
description: Directory path where the jar should be extracted (defaults to current directory)
required: false
default: "."
runs:
using: "composite"
@@ -25,7 +33,7 @@ runs:
});
if (!artifacts.data?.artifacts?.[0]?.id) {
throw new Error(`No artifacts found for ${{ inputs.commit }}`);
throw new Error(`No artifacts found for ${{ inputs.name }}`);
}
const artifact_id = artifacts.data.artifacts[0].id;
@@ -39,25 +47,59 @@ runs:
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/mb.zip`, Buffer.from(download.data));
- name: unzip uberjar artifact
shell: bash
run: unzip mb.zip
- name: Move the Uberjar
- name: Extract and rename JAR
shell: bash
run: | # bash
if [ -e "metabase.jar" ]; then
echo "metabase.jar is already in the right place"
elif [ -e "target/uberjar/metabase.jar" ]; then
echo "moving metabase.jar to current directory"
mv target/uberjar/metabase.jar metabase.jar
OUTPUT_NAME="${{ inputs.output-name }}"
EXTRACT_PATH="${{ inputs.extract-path }}"
# Create a temporary directory for extraction to avoid conflicts
TEMP_DIR=$(mktemp -d)
# Extract to temporary directory
unzip mb.zip -d "$TEMP_DIR"
# Create target directory
mkdir -p "$EXTRACT_PATH"
# Find the jar and move all files from its directory
if [ -e "$TEMP_DIR/metabase.jar" ]; then
# Move all files to extract path
mv "$TEMP_DIR"/* "$EXTRACT_PATH/" 2>/dev/null || true
# Rename the jar to custom name if different
if [ "$OUTPUT_NAME" != "metabase.jar" ]; then
mv "$EXTRACT_PATH/metabase.jar" "$EXTRACT_PATH/$OUTPUT_NAME"
fi
elif [ -e "$TEMP_DIR/target/uberjar/metabase.jar" ]; then
# Move all files from uberjar directory to extract path
mv "$TEMP_DIR/target/uberjar"/* "$EXTRACT_PATH/" 2>/dev/null || true
# Rename the jar to custom name if different
if [ "$OUTPUT_NAME" != "metabase.jar" ]; then
mv "$EXTRACT_PATH/metabase.jar" "$EXTRACT_PATH/$OUTPUT_NAME"
fi
else
echo "Could not find the metabase.jar file"
echo "Could not find metabase.jar in extracted files"
exit 1
fi
# Clean up temporary directory
rm -rf "$TEMP_DIR"
# Set the JAR_PATH environment variable
if [ "$EXTRACT_PATH" == "." ]; then
echo "JAR_PATH=$OUTPUT_NAME" >> $GITHUB_ENV
else
echo "JAR_PATH=$EXTRACT_PATH/$OUTPUT_NAME" >> $GITHUB_ENV
fi
- name: Verify that this is a valid JAR file
shell: bash
run: file --mime-type ./metabase.jar
run: |
echo "Verifying JAR at: $JAR_PATH"
file --mime-type "$JAR_PATH"
- name: Reveal its version.properties
shell: bash
run: jar xf metabase.jar version.properties && cat version.properties
run: |
echo "Extracting version.properties from: $JAR_PATH"
jar xf "$JAR_PATH" version.properties && cat version.properties

View File

@@ -0,0 +1,27 @@
name: Get cache keys
description: |
Get deterministic cache keys for Maven and Node.js caches based on the centrally controlled cache prefix,
and the suffix based on the runner OS and the current week of the year.
outputs:
m2-cache-key:
description: "The cache key for the Maven cache."
value: ${{ steps.keys-factory.outputs.m2-cache-key }}
node-cache-key:
description: "The cache key for the Node.js cache."
value: ${{ steps.keys-factory.outputs.node-cache-key }}
runs:
using: "composite"
steps:
- name: Generate and output cache keys
id: keys-factory
run: |
M2_CACHE_PREFIX='M2'
NODE_CACHE_PREFIX='node-modules'
WEEK_OF_YEAR=$(/bin/date "+%G-%V")
CACHE_SUFFIX="${{ runner.os }}-$WEEK_OF_YEAR"
echo "m2-cache-key=$M2_CACHE_PREFIX-$CACHE_SUFFIX" >> $GITHUB_OUTPUT
echo "node-cache-key=$NODE_CACHE_PREFIX-$CACHE_SUFFIX" >> $GITHUB_OUTPUT
shell: bash

View File

@@ -0,0 +1,74 @@
name: Get Docker Info
description: Determines Docker repository and tag based on branch and edition
inputs:
branch:
description: Branch name (defaults to current branch)
required: false
default: ${{ github.head_ref || github.ref_name }}
edition:
description: Edition (ee or oss)
required: false
default: ee
owner:
description: Repository owner (defaults to current repo owner)
required: false
default: ${{ github.repository_owner }}
outputs:
repo:
description: Docker repository name
value: ${{ steps.docker-info.outputs.repo }}
tag:
description: Docker tag
value: ${{ steps.docker-info.outputs.tag }}
full_image:
description: Full Docker image name (repo:tag)
value: ${{ steps.docker-info.outputs.full_image }}
editions:
description: JSON array of editions to build
value: ${{ steps.docker-info.outputs.editions }}
runs:
using: "composite"
steps:
- name: Determine Docker info
id: docker-info
uses: actions/github-script@v7
with:
script: | # js
const branch = '${{ inputs.branch }}';
const edition = '${{ inputs.edition }}';
const owner = '${{ inputs.owner }}';
console.log(`Determining Docker info for branch: ${branch}, edition: ${edition}`);
let repo, tag, editions;
if (branch === 'master') {
// Master builds both editions with specific repos
editions = ['ee', 'oss'];
tag = 'latest';
if (edition === 'ee') {
repo = `${owner}/metabase-enterprise-head`;
} else {
repo = `${owner}/metabase-head`;
}
} else {
// All other branches only build EE to metabase-dev
editions = ['ee'];
tag = branch.replaceAll('/', '-'); // slashes make docker sad
repo = `${owner}/metabase-dev`;
}
const fullImage = `${repo}:${tag}`;
// Set outputs
core.setOutput('repo', repo);
core.setOutput('tag', tag);
core.setOutput('full_image', fullImage);
core.setOutput('editions', JSON.stringify(editions));
console.log(`Docker image: ${fullImage}`);
console.log(`Editions: ${JSON.stringify(editions)}`);

View File

@@ -1,4 +1,7 @@
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
@@ -6,10 +9,6 @@ inputs:
clojure-version:
required: true
default: '1.12.0.1488'
m2-cache-key:
description: 'Key to cache M2 packages from Maven Central'
required: true
default: 'm2'
runs:
using: "composite"
@@ -21,20 +20,24 @@ runs:
distribution: 'temurin'
- name: Install Clojure CLI
shell: bash
continue-on-error: true
run: |
curl -O https://download.clojure.org/install/linux-install-${{ inputs.clojure-version }}.sh &&
sudo bash ./linux-install-${{ inputs.clojure-version }}.sh
- name: Check to see if dependencies should be cached
if: ${{ contains(github.event.head_commit.message, '[ci nocache]') }}
run: echo "Commit message includes [ci nocache]; dependencies will NOT be cached"
- name: Fetch CI config
shell: bash
- name: Get M2 cache
uses: actions/cache@v4
if: ${{ !contains(github.event.head_commit.message, '[ci nocache]') }}
run: |
curl -o ci-test-config.json https://raw.githubusercontent.com/metabase/metabase/refs/heads/master/ci-test-config.json
- name: Get M2 cache key
uses: ./.github/actions/get-cache-keys
id: get-cache-keys
- name: Restore M2 cache
uses: actions/cache/restore@v4
with:
path: |
~/.m2
~/.gitlibs
key: ${{ runner.os }}-${{ inputs.m2-cache-key }}-${{ hashFiles('**/deps.edn') }}
restore-keys: |
${{ runner.os }}-${{ inputs.m2-cache-key }}-
key: ${{ steps.get-cache-keys.outputs.m2-cache-key }}

View File

@@ -22,16 +22,16 @@ runs:
chrome-version: 1097615
id: setup-chrome
- name: Check to see if dependencies should be cached
if: ${{ contains(github.event.head_commit.message, '[ci nocache]') }}
run: echo "Commit message includes [ci nocache]; dependencies will NOT be cached"
- name: Get current week of year
id: get-date
run: |
echo "week-of-year=$(/bin/date "+%G-%V")" >> $GITHUB_OUTPUT
shell: bash
- name: Get Cypress cache
uses: actions/cache@v4
if: ${{ !contains(github.event.head_commit.message, '[ci nocache]') }}
with:
path: ~/.cache/Cypress
key: ${{ runner.os }}-Cypress-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-Cypress-${{ steps.get-date.outputs.week-of-year }}
- name: Ensure that Cypress executable is ready
run: |
yarn cypress install

View File

@@ -3,6 +3,10 @@ inputs:
node-version:
description: "The version of Node.js to use, overriding .nvmrc"
required: false
apply-patches:
description: "Whether to patch frontend dependencies with patch-package."
required: true
default: 'true'
runs:
using: "composite"
steps:
@@ -12,26 +16,32 @@ runs:
node-version: ${{ inputs.node-version }} # this overrides, if present
node-version-file: ".nvmrc"
- name: Check to see if dependencies should be cached
if: ${{ contains(github.event.head_commit.message, '[ci nocache]') }}
run: |
echo "Commit message includes [ci nocache]; dependencies will NOT be cached"
yarn cache clean
shell: bash
- name: Get M2 cache
uses: actions/cache@v4
if: ${{ !contains(github.event.head_commit.message, '[ci nocache]') }}
with:
path: ~/.m2
key: ${{ runner.os }}-cljs-${{ hashFiles('**/shadow-cljs.edn') }}
- name: Get cache keys
uses: ./.github/actions/get-cache-keys
id: get-cache-keys
- name: Get node_modules cache
uses: actions/cache@v4
- name: Restore M2 cache
uses: actions/cache/restore@v4
with:
path: |
~/.m2
~/.gitlibs
key: ${{ steps.get-cache-keys.outputs.m2-cache-key }}
- name: Restore node_modules cache
uses: actions/cache/restore@v4
id: node-modules-cache
if: ${{ !contains(github.event.head_commit.message, '[ci nocache]') }}
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock', '**/patches/*.patch') }}
key: ${{ steps.get-cache-keys.outputs.node-cache-key }}
- run: yarn install --frozen-lockfile --prefer-offline
# postinstall lifecycle hook can be dangerous in CI so we only run it locally (see package.json)
# If a job wants to patch packages, it does so explicitly in the CI. This setting is opt-out.
# For example, we never want to cache node_modules with patches already applied so cache-generator.yml skips that step.
- name: Clean install
run: yarn install --frozen-lockfile --prefer-offline
shell: bash
- name: Patch frontend dependencies
if: inputs.apply-patches == 'true'
run: yarn patch-package
shell: bash

View File

@@ -7,8 +7,6 @@ runs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Compile CLJS
run: yarn build-pure:cljs

View File

@@ -0,0 +1,14 @@
name: Setup Python Runner
description: Setup python-runner for tests
inputs:
metabase-automation-token:
description: Token for accessing the python-runner repository
required: true
runs:
using: composite
steps:
- name: Setup python-runner
run: ./.github/scripts/setup-python-runner.sh
shell: bash
env:
METABASE_AUTOMATION_USER_TOKEN: ${{ inputs.metabase-automation-token }}

View File

@@ -1,4 +1,5 @@
name: Test database driver
description: Test database driver
inputs:
junit-name:
required: true
@@ -14,8 +15,6 @@ runs:
steps:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: driver
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
if: ${{ inputs.build-static-viz == 'true' }}
@@ -39,7 +38,7 @@ runs:
list-tests: failed
fail-on-error: false
- name: Upload Logs on Failure
if: failure()
if: always() && !success()
uses: actions/upload-artifact@v4
with:
name: test-logs-${{ github.job }}

41
.github/actions/update-cache/action.yml vendored Normal file
View File

@@ -0,0 +1,41 @@
name: Update cache
description: |
Update a GitHub Actions cache based on a provided path and key.
If a cache entry already exists for the given key, it is first removed.
This ensures immutability of cache entries, and prevents runtime errors.
inputs:
path:
description: "The path(s) to cache, separated by newlines."
required: true
key:
description: "The cache key to use."
required: true
runs:
using: "composite"
steps:
- name: Check if the cache entry exists
id: cache-lookup
uses: actions/cache/restore@v4
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}
lookup-only: true # Important bit: the action will not fetch anything, just check for the cache existence.
- name: Delete the cache entry if it exists
if: ${{ steps.cache-lookup.outputs.cache-hit == 'true' }}
run: |
echo "Cache entry found for key '${{ inputs.key }}'. Deleting it to ensure immutability."
gh api \
--method DELETE \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{ github.repository }}/actions/caches?key=${{ inputs.key }}
env:
GH_TOKEN: ${{ github.token }}
shell: bash
- name: Save the new cache entry
uses: actions/cache/save@v4
with:
path: ${{ inputs.path }}
key: ${{ inputs.key }}

View File

@@ -11,4 +11,7 @@ runs:
env:
GITHUB_TOKEN: ${{ inputs.github-token }}
shell: bash
run: bash ${{ github.action_path }}/upgrade-deps.sh
run: |
git config --global user.email "github-automation@metabase.com"
git config --global user.name "Metabase Automation"
bash ${{ github.action_path }}/upgrade-deps.sh

View File

@@ -59,6 +59,11 @@ for upgrade in $UPGRADES; do
# Commit the dependency update, and link to the diff
git add deps.edn modules
# Use an email and name that will pass the CLA check:
git config --global user.email "github-automation@metabase.com"
git config --global user.name "Metabase Automation"
git commit -m ${TITLE} -m ${BODY} --no-verify
git push -u origin $BRANCH_NAME

View File

@@ -55,4 +55,3 @@ runs:
variant: ${{ inputs.variant || inputs.output-name }}
org-slug: metabase
token: ${{ inputs.trunk-api-token }}
continue-on-error: true

52
.github/copilot-instructions.md vendored Normal file
View File

@@ -0,0 +1,52 @@
# Metabase Developer Assistant Instructions
## Frontend Development
### Repository Structure
```
frontend/src/
├── metabase/ # Main application components and pages
├── metabase-lib/ # Query building and data modeling utilities
├── metabase-types/ # TypeScript type definitions
└── metabase/ui/ # Design system components
e2e/ # Cypress end-to-end tests
frontend/test/ # Jest unit tests
```
### Technology Stack
- **Framework**: React 18 with TypeScript
- **State**: Redux Toolkit
- **Styling**: CSS Modules (preferred) > Emotion styled-components
- **UI**: `metabase/ui` components built with Mantine v8
- **Build**: Rspack (primary), Webpack (legacy)
- **Testing**: Jest + React Testing Library, Cypress
### Coding Standards
#### Component Preferences
- Prefer `metabase/ui`components over `metabase/common/components`
- Use `.tsx` for components, `.ts` for utilities
#### Styling
ALWAYS prefer Mantine style props,then CSS modules. DO NOT suggest styled components, they are deprecated.
#### TypeScript Migration
When heavily editing `.js`/`.jsx` files, create a separate PR to convert to TypeScript first, then implement changes.
#### Enterprise Features
Enterprise functionality MUST use the plugin system. It is very important to not expose enterprise code in the OSS version.
#### Testing Requirements
All PRs should include tests. Prefer Unit tests over E2E tests.
#### Localization
All user-facing strings MUST be localized using the ttag library. Localized strings should be complete phrases, do not concatenate a few separately localized strings. You should add context to strings where the meaning of the string might not be obvious in isolation: e.g. "Home" might have different words in some languages depending on whether you're talking about a dwelling or the landing page for a website.

View File

@@ -29,9 +29,10 @@ frontend_configs: &frontend_configs
- ".eslintrc.js"
- "postcss.config.js"
- "rspack.config.js"
- "webpack.config.js"
- "webpack.embedding-sdk.config.js"
- "webpack.static-viz.config.js"
- "rspack.main.config.js"
- "rspack.embedding-sdk-package.config.js"
- "rspack.embedding-sdk-bundle.config.js"
- "rspack.static-viz.config.js"
- ".nvmrc"
frontend_sources: &frontend_sources
@@ -40,10 +41,17 @@ frontend_sources: &frontend_sources
- "enterprise/frontend/!(test)**/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
- "frontend/!(test)**/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
frontend_embedding_sources:
- "enterprise/frontend/src/{embedding,embedding-*}/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
- "enterprise/frontend/src/metabase-enterprise/{embedding,embedding-*}**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
frontend_embedding_sdk_sources:
- *frontend_configs
- "enterprise/frontend/!(test)**/**/{!(*.spec),}.{js,jsx,ts,tsx,css}"
frontend_embedding_sdk_package_sources:
- "enterprise/frontend/src/embedding-sdk-package/**/!(*.spec).{js,jsx,ts,tsx,css}"
frontend_specs: &frontend_specs
- *shared_specs
- "frontend/test/**"
@@ -132,20 +140,22 @@ e2e_embedding_sdk_compatibility:
- *default
- *frontend_embedding_sdk_ci
- *frontend_sources
- *backend_sources
- "e2e/embedding-sdk-host-apps/**"
- "e2e/runner/embedding-sdk/**"
- "e2e/test-host-app/**/*.cy.*.{js,ts}"
snowplow: &snowplow
- ".github/workflows/snowplow.yml"
- "snowplow/**"
e2e_all:
- *default
- *e2e_ci
- *sources
- *e2e_specs
- "e2e/**"
snowplow:
- ".github/workflows/snowplow.yml"
- "snowplow/**"
- *snowplow
documentation:
- "docs/**"

171
.github/scripts/average-e2e-timings.js vendored Normal file
View File

@@ -0,0 +1,171 @@
const fs = require("fs");
const path = require("path");
const { execSync } = require("child_process");
const collectAndAverageTimings = async ({
github,
context,
daysBack = 7,
existingTimingsPath = "e2e/support/timings.json",
}) => {
try {
const artifacts = await findMergedTimingArtifacts({
github,
context,
daysBack,
});
if (artifacts.length === 0) {
throw new Error("No timing artifacts found in the specified time range");
}
const timingData = await downloadAndExtractArtifacts(
artifacts,
github,
context,
);
if (timingData.length === 0) {
throw new Error("No valid timing data extracted from artifacts");
}
const averagedTimings = averageTimings(timingData);
averagedTimings.durations.sort((a, b) => a.spec.localeCompare(b.spec));
fs.writeFileSync(
existingTimingsPath,
JSON.stringify(averagedTimings, null, 2),
);
console.log(`✅ Updated ${existingTimingsPath} with new timing data`);
return { artifactCount: timingData.length };
} catch (error) {
console.error("❌ Error in collectAndAverageTimings:", error.message);
throw error;
}
};
const findMergedTimingArtifacts = async ({ github, context, daysBack }) => {
const cutoffDate = new Date();
cutoffDate.setDate(cutoffDate.getDate() - daysBack);
console.log(
`Searching for merged timing artifacts created after ${cutoffDate.toISOString()}`,
);
const artifacts = [];
let page = 1;
while (true) {
try {
const { data } = await github.rest.actions.listArtifactsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
name: "merged-e2e-timings",
per_page: 100,
page,
});
const validArtifacts = data.artifacts
.filter((a) => new Date(a.created_at) > cutoffDate && !a.expired)
.map(({ name, created_at, id }) => ({ name, created_at, id }));
artifacts.push(...validArtifacts);
if (
data.artifacts.some((a) => new Date(a.created_at) <= cutoffDate) ||
data.artifacts.length < 100
) {
break;
}
page++;
} catch (error) {
console.log(
`Error fetching artifacts page ${page - 1}: ${error.message}`,
);
break;
}
}
console.log(`Found ${artifacts.length} merged timing artifacts total`);
return artifacts;
};
const downloadAndExtractArtifacts = async (artifacts, github, context) => {
const tempDir = "timing-artifacts-temp";
fs.mkdirSync(tempDir, { recursive: true });
const timingData = [];
for (const artifact of artifacts) {
try {
console.log(`Downloading artifact: ${artifact.name}`);
const zipPath = path.join(tempDir, `${artifact.name}.zip`);
const extractPath = path.join(tempDir, artifact.name);
const { data } = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact.id,
archive_format: "zip",
});
fs.writeFileSync(zipPath, Buffer.from(data));
fs.mkdirSync(extractPath, { recursive: true });
execSync(`unzip -q "${zipPath}" -d "${extractPath}"`);
const timingFilePath = path.join(extractPath, "runTimings.json");
if (fs.existsSync(timingFilePath)) {
const content = JSON.parse(fs.readFileSync(timingFilePath, "utf8"));
if (content.durations?.length) {
timingData.push(content);
console.log(
`✅ Extracted timing data from ${artifact.name} (${content.durations.length} specs)`,
);
} else {
console.log(`⚠ Invalid timing data structure in ${artifact.name}`);
}
} else {
console.log(`⚠ No timing data found in ${artifact.name}`);
}
fs.rmSync(extractPath, { recursive: true });
} catch (error) {
console.log(`❌ Error processing ${artifact.name}: ${error.message}`);
}
}
fs.rmSync(tempDir, { recursive: true });
console.log(
`Successfully extracted timing data from ${timingData.length}/${artifacts.length} artifacts`,
);
return timingData;
};
const averageTimings = (timingDataArray) => {
if (!timingDataArray.length) {
throw new Error("No timing data to process");
}
const specTimings = timingDataArray
.flatMap((data) => data.durations)
.filter((item) => item.spec && typeof item.duration === "number")
.reduce((acc, { spec, duration }) => {
(acc[spec] = acc[spec] || []).push(duration);
return acc;
}, {});
const durations = Object.entries(specTimings).map(([spec, durations]) => ({
spec,
duration: Math.round(
durations.reduce((sum, d) => sum + d, 0) / durations.length,
),
}));
return { durations };
};
module.exports = { collectAndAverageTimings, averageTimings };

View File

@@ -0,0 +1,132 @@
const { averageTimings } = require("./average-e2e-timings");
describe("averageTimings", () => {
it("should throw error when given empty array", () => {
expect(() => averageTimings([])).toThrow("No timing data to process");
});
it("should work for n=1", () => {
const input = [
{
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
},
];
const result = averageTimings(input);
expect(result.durations).toHaveLength(2);
expect(result.durations).toContainEqual({
spec: "test1.cy.js",
duration: 1000,
});
expect(result.durations).toContainEqual({
spec: "test2.cy.js",
duration: 2000,
});
});
it("should calculate average for multiple specs", () => {
const input = [
{
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
},
{
durations: [
{ spec: "test1.cy.js", duration: 2000 },
{ spec: "test2.cy.js", duration: 4000 },
],
},
];
const result = averageTimings(input);
expect(result.durations).toHaveLength(2);
expect(result.durations).toContainEqual({
spec: "test1.cy.js",
duration: 1500,
});
expect(result.durations).toContainEqual({
spec: "test2.cy.js",
duration: 3000,
});
});
it("should round averages to nearest integer", () => {
const input = [
{
durations: [{ spec: "test1.cy.js", duration: 1001 }],
},
{
durations: [{ spec: "test1.cy.js", duration: 1002 }],
},
];
const result = averageTimings(input);
expect(result.durations[0].duration).toBe(1002);
});
it("should ignore invalid entries", () => {
const input = [
{
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: "invalid" },
{ duration: 2000 }, // missing spec
{ spec: "test3.cy.js", duration: 3000 },
],
},
];
const result = averageTimings(input);
expect(result.durations).toHaveLength(2);
expect(result.durations).toContainEqual({
spec: "test1.cy.js",
duration: 1000,
});
expect(result.durations).toContainEqual({
spec: "test3.cy.js",
duration: 3000,
});
});
it("should handle merging different specs", () => {
const input = [
{
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
},
{
durations: [
{ spec: "test1.cy.js", duration: 3000 },
{ spec: "test3.cy.js", duration: 1000 },
],
},
];
const result = averageTimings(input);
expect(result.durations).toHaveLength(3);
expect(result.durations).toContainEqual({
spec: "test1.cy.js",
duration: 2000,
});
expect(result.durations).toContainEqual({
spec: "test2.cy.js",
duration: 2000,
});
expect(result.durations).toContainEqual({
spec: "test3.cy.js",
duration: 1000,
});
});
});

View File

@@ -18,6 +18,7 @@ const specialTestConfigs = [
specs: DEFAULT_SPEC_PATTERN,
},
{ name: "mongo", tags: "@mongo", specs: DEFAULT_SPEC_PATTERN },
{ name: "python", tags: "@python", specs: DEFAULT_SPEC_PATTERN },
];
/**

View File

@@ -11,7 +11,7 @@ describe("buildMatrix", () => {
it("should calculate correct regular chunks with default parameters", () => {
const result = testBuildMatrix("./e2e/test/scenarios/**/*.cy.spec.*", 30);
expect(result.regularChunks).toBe(27);
expect(result.regularChunks).toBe(26);
});
it("should create correct number of configuration objects", () => {
@@ -21,10 +21,10 @@ describe("buildMatrix", () => {
});
it("should apply default specs path when empty entry is provided", () => {
const result = testBuildMatrix("", 5);
const result = testBuildMatrix("", 6);
expect(result.regularChunks).toBe(2);
expect(result.config.length).toBe(5);
expect(result.config.length).toBe(6);
});
it("should name regular test groups sequentially", () => {
@@ -39,13 +39,14 @@ describe("buildMatrix", () => {
});
it("should handle case when input chunks equals special tests count", () => {
const result = testBuildMatrix("./e2e/test/scenarios/**/*.cy.spec.*", 3);
const result = testBuildMatrix("./e2e/test/scenarios/**/*.cy.spec.*", 4);
expect(result.regularChunks).toBe(0);
expect(result.config.length).toBe(3);
expect(result.config.length).toBe(4);
expect(result.config[0].name).toBe("embedding-sdk");
expect(result.config[1].name).toBe("oss-subset");
expect(result.config[2].name).toBe("mongo");
expect(result.config[3].name).toBe("python");
});
it("should correctly calculate regularChunks for non-default spec pattern", () => {
@@ -83,9 +84,10 @@ describe("buildMatrix", () => {
it("should return special test configs when default spec pattern is provided", () => {
const result = testBuildMatrix("./e2e/test/scenarios/**/*.cy.spec.*", 50);
expect(result.config[47].name).toBe("embedding-sdk");
expect(result.config[48].name).toBe("oss-subset");
expect(result.config[49].name).toBe("mongo");
expect(result.config[46].name).toBe("embedding-sdk");
expect(result.config[47].name).toBe("oss-subset");
expect(result.config[48].name).toBe("mongo");
expect(result.config[49].name).toBe("python");
});
it("should not return special test configs when non-default spec pattern is provided", () => {

View File

@@ -1,24 +1,66 @@
exports.updateComment = updateComment;
const TYPES = new Set([
"feat",
"fix",
"perf",
"docs",
"style",
"refactor",
"test",
"build",
"ci",
]);
/**
* @param title {string}
*/
function isConventionalTitle(title) {
const match = /^(?<type>\w+)\((?<rawScopes>[^)]+)\):/.exec(title);
if (!match) {
return false;
}
const [, type, rawScopes] = match;
const scopes = rawScopes
.split(",")
.map((scope) => scope.trim())
.filter(Boolean);
return TYPES.has(type) && scopes.length > 0;
}
/** @param {import('@types/github-script').AsyncFunctionArguments} AsyncFunctionArguments */
async function updateComment({ github, context }) {
async function updateCommentForEmbedding({ github, context }) {
const githubUsername = context.payload.sender.login;
const comment = `${CONVENTIONAL_COMMIT_REMINDER_COMMENT_IDENTIFIER}
@${githubUsername} You have modified embedding SDK code. Please make sure the PR title follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) style.
Here are all the supported types that will be shown in the changelog:
const comment = `${CONVENTIONAL_COMMENT_IDENTIFIER}
@${githubUsername} You have modified embedding code. Please make sure the PR title follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) style.
Here are all the supported types:
- \`feat\`
- \`fix\`
- \`perf\`
- \`docs\`
- \`style\`
- \`refactor\`
- \`test\`
- \`build\`
- \`ci\`
These types \`docs\`, \`style\`, \`refactor\`, \`test\`, \`build\`, and \`ci\` are also encouraged for non-changelog related tasks.
Please also make sure to include \`sdk\` scope, otherwise, the changelog will not include this task.
Please also make sure to include a scope.
For example, these are valid PR titles:
- \`feat(sdk): Add interactive dashboard component\`
- \`feat(sdk): Support theming pie chart\`
- \`fix(sdk): Fix static dashboard crash\``;
- \`feat(sdk-bundle): Add interactive dashboard component\`
- \`fix(sdk-package): Fixed MetabaseProviderPropsStore logic\`
- \`fix(sdk-package, embed-js): Fix API\``;
return updateComment(comment, { github, context });
}
/**
* @param comment {string}
* @param {import('@types/github-script').AsyncFunctionArguments} AsyncFunctionArguments
*/
async function updateComment(comment, { github, context }) {
const owner = context.repo.owner;
const repo = context.repo.repo;
const pullRequestNumber = context.issue.number;
@@ -49,20 +91,19 @@ For example, these are valid PR titles:
}
}
const CONVENTIONAL_COMMIT_REMINDER_COMMENT_IDENTIFIER =
"<!---conventional commit reminder comment ID-->";
const CONVENTIONAL_COMMENT_IDENTIFIER =
"<!---conventional comment identifier-->";
/**
* @typedef Comment
* @property {string} body
*
* @param {Comment[]} comments
* @param comments {{body: string}[]}
*/
function getExistingConventionalCommitReminderComment(comments) {
for (const comment of comments) {
if (
comment.body.startsWith(CONVENTIONAL_COMMIT_REMINDER_COMMENT_IDENTIFIER)
) {
if (comment.body.startsWith(CONVENTIONAL_COMMENT_IDENTIFIER)) {
return comment;
}
}
}
exports.isConventionalTitle = isConventionalTitle;
exports.updateCommentForEmbedding = updateCommentForEmbedding;

View File

@@ -0,0 +1,45 @@
const { isConventionalTitle } = require("./utils");
describe("isConventionalTitle", () => {
it("returns true for a simple conventional commit", () => {
expect(isConventionalTitle("feat: add new feature")).toBe(false);
});
it("returns true for a commit with a scope", () => {
expect(isConventionalTitle("fix(api): correct API bug")).toBe(true);
});
it("returns true for a commit with multiple scopes, comma separated", () => {
expect(isConventionalTitle("feat(build,deps): update dependencies")).toBe(
true,
);
});
it("returns true for a commit with multiple scopes, comma separated with space", () => {
expect(isConventionalTitle("feat(build, deps): update dependencies")).toBe(
true,
);
});
it("returns false for a commit with round brackets in a message", () => {
expect(isConventionalTitle("feat: (something) update dependencies")).toBe(
false,
);
});
it("returns false for missing colon", () => {
expect(isConventionalTitle("feat add feature")).toBe(false);
});
it("returns false for invalid type", () => {
expect(isConventionalTitle("invalidType: some message")).toBe(false);
});
it("returns false for empty message", () => {
expect(isConventionalTitle("feat:")).toBe(false);
});
it("returns false for empty input", () => {
expect(isConventionalTitle("")).toBe(false);
});
});

View File

@@ -0,0 +1,39 @@
const extractChangedTimings = ({ oldTimings, newTimings }) => {
const oldTimingMap =
oldTimings.durations?.reduce((map, item) => {
if (item.spec) {
map[item.spec] = item.duration;
}
return map;
}, {}) || {};
const changedDurations = newTimings.durations
.filter((item) => {
if (!item || !item.spec || typeof item.duration !== "number") {
return false;
}
const newSpec = convertPathFormat(item.spec);
const oldDuration = oldTimingMap[newSpec] || oldTimingMap[item.spec];
// Include if it's a new spec or the duration has changed
return oldDuration === undefined || oldDuration !== item.duration;
})
.map((item) => ({
spec: convertPathFormat(item.spec),
duration: item.duration,
}));
return {
changedTimings: { durations: changedDurations },
hasChanges: changedDurations.length > 0,
};
};
// Convert cypress-split path format to timings.json path format
// from "e2e/test/scenarios/..." to "../test/scenarios/..."
function convertPathFormat(specPath) {
return specPath.startsWith("e2e/test/")
? specPath.replace("e2e/test/", "../test/")
: specPath;
}
module.exports = { extractChangedTimings };

View File

@@ -0,0 +1,195 @@
const { extractChangedTimings } = require("./extract-changed-timings");
describe("extractChangedTimings", () => {
it("should return empty durations when no changes", () => {
const oldTimings = {
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
};
const newTimings = {
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
};
const result = extractChangedTimings({ oldTimings, newTimings });
expect(result.changedTimings.durations).toHaveLength(0);
expect(result.hasChanges).toBe(false);
});
it("should detect new specs", () => {
const oldTimings = {
durations: [{ spec: "test1.cy.js", duration: 1000 }],
};
const newTimings = {
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
};
const result = extractChangedTimings({ oldTimings, newTimings });
expect(result.changedTimings.durations).toHaveLength(1);
expect(result.changedTimings.durations[0]).toEqual({
spec: "test2.cy.js",
duration: 2000,
});
expect(result.hasChanges).toBe(true);
});
it("should detect duration changes", () => {
const oldTimings = {
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
};
const newTimings = {
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2200 },
],
};
const result = extractChangedTimings({ oldTimings, newTimings });
expect(result.changedTimings.durations).toHaveLength(1);
expect(result.changedTimings.durations[0]).toEqual({
spec: "test2.cy.js",
duration: 2200,
});
expect(result.hasChanges).toBe(true);
});
it("should handle missing old timings", () => {
const oldTimings = { durations: [] };
const newTimings = {
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
};
const result = extractChangedTimings({ oldTimings, newTimings });
// All timings should be considered "changed" since old timings is empty
expect(result.changedTimings.durations).toHaveLength(2);
expect(result.changedTimings.durations).toContainEqual({
spec: "test1.cy.js",
duration: 1000,
});
expect(result.changedTimings.durations).toContainEqual({
spec: "test2.cy.js",
duration: 2000,
});
expect(result.hasChanges).toBe(true);
});
it("should handle invalid timing entries", () => {
const oldTimings = {
durations: [{ spec: "test1.cy.js", duration: 1000 }],
};
const newTimings = {
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: "invalid" },
{ duration: 2000 }, // missing spec
{ spec: "test3.cy.js", duration: 3000 },
],
};
const result = extractChangedTimings({ oldTimings, newTimings });
// Only test3.cy.js should be included (new spec with valid data)
expect(result.changedTimings.durations).toHaveLength(1);
expect(result.changedTimings.durations[0]).toEqual({
spec: "test3.cy.js",
duration: 3000,
});
expect(result.hasChanges).toBe(true);
});
it("should handle timing data with different specs", () => {
const oldTimings = {
durations: [
{ spec: "test1.cy.js", duration: 1000 },
{ spec: "test2.cy.js", duration: 2000 },
],
};
const newTimings = {
durations: [
{ spec: "test1.cy.js", duration: 3000 },
{ spec: "test3.cy.js", duration: 1000 },
],
};
const result = extractChangedTimings({ oldTimings, newTimings });
expect(result.changedTimings.durations).toHaveLength(2);
expect(result.changedTimings.durations).toContainEqual({
spec: "test1.cy.js",
duration: 3000,
});
expect(result.changedTimings.durations).toContainEqual({
spec: "test3.cy.js",
duration: 1000,
});
expect(result.hasChanges).toBe(true);
});
it("should convert cypress-split paths to relative paths", () => {
const oldTimings = {
durations: [
{
spec: "../test/scenarios/dashboard/dashboard.cy.spec.js",
duration: 1000,
},
{
spec: "../test/scenarios/admin/databases.cy.spec.js",
duration: 2000,
},
],
};
const newTimings = {
durations: [
{
spec: "e2e/test/scenarios/dashboard/dashboard.cy.spec.js",
duration: 1200,
},
{
spec: "e2e/test/scenarios/admin/databases.cy.spec.js",
duration: 2000,
},
{
spec: "e2e/test/scenarios/collections/collections.cy.spec.js",
duration: 1500,
},
],
};
const result = extractChangedTimings({ oldTimings, newTimings });
expect(result.changedTimings.durations).toHaveLength(2);
expect(result.changedTimings.durations).toContainEqual({
spec: "../test/scenarios/dashboard/dashboard.cy.spec.js",
duration: 1200,
});
expect(result.changedTimings.durations).toContainEqual({
spec: "../test/scenarios/collections/collections.cy.spec.js",
duration: 1500,
});
expect(result.hasChanges).toBe(true);
});
});

84
.github/scripts/get-issue-data.js vendored Normal file
View File

@@ -0,0 +1,84 @@
const githubSlackMap = require("../../release/github-slack-map.json");
async function getIssueData({ context, github, manualIssueNumber }) {
let issueNumber;
let issueData;
let prReviews = [];
const triggerType = context.eventName;
if (context.eventName === "issues") {
issueNumber = context.payload.issue.number;
issueData = context.payload.issue;
} else if (context.eventName === "workflow_dispatch") {
issueNumber = parseInt(manualIssueNumber);
const { data } = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
});
issueData = data;
} else if (context.eventName === "pull_request_review") {
const prNumber = context.payload.pull_request.number;
const { data: prData } = await github.rest.pulls.get({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
});
// Extract issue number from branch name (e.g., "claude-fix/issue-12345-some-title")
const branchMatch = prData.head.ref.match(/claude-fix\/issue-(\d+)/);
if (!branchMatch) {
throw new Error(
`Could not extract issue number from branch name: ${prData.head.ref}`,
);
}
issueNumber = parseInt(branchMatch[1]);
const { data } = await github.rest.issues.get({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
});
issueData = data;
const { data: reviews } = await github.rest.pulls.listReviews({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: prNumber,
});
prReviews = reviews.filter(
(review) =>
review.state === "CHANGES_REQUESTED" &&
isMetabaseMember(review.user.login),
);
}
const { data: comments } = await github.rest.issues.listComments({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
});
const employeeComments = comments.filter((comment) =>
isMetabaseMember(comment.user.login),
);
return {
issueNumber,
issueData,
employeeComments,
prReviews,
triggerType,
isIssueAuthorEmployee: isMetabaseMember(issueData.user.login),
};
}
function isMetabaseMember(username) {
return username in githubSlackMap;
}
module.exports = {
getIssueData,
};

30
.github/scripts/setup-python-runner.sh vendored Executable file
View File

@@ -0,0 +1,30 @@
#!/bin/bash
set -e
# Parse command line arguments
SKIP_START=false
while [[ $# -gt 0 ]]; do
case $1 in
--skip-start)
SKIP_START=true
shift
;;
*)
echo "Unknown option: $1"
echo "Usage: $0 [--skip-start]"
exit 1
;;
esac
done
echo "Cloning python-runner repository..."
git clone --depth 1 https://${METABASE_AUTOMATION_USER_TOKEN}@github.com/metabase/python-runner-container.git python-runner
if [ "$SKIP_START" = false ]; then
echo "Starting python-runner..."
cd python-runner
make run-ci 1> ../python-runner.out.log 2> ../python-runner.err.log
make logs 1>> ../python-runner.out.log 2>> ../python-runner.err.log &
cd ..
fi

98
.github/team.json vendored
View File

@@ -8,22 +8,11 @@
"romeovs",
"bshepherdson",
"metamben",
"appleby",
"uladzimirdev",
"wzimrin",
"ericnormand",
"galdre"
]
},
{
"name": "Semantic Layer",
"label": ".Team/SemanticLayer",
"members": [
"kamilmielnik",
"lbrdnk",
"bronsa"
]
},
{
"name": "Drivers",
"label": ".Team/Drivers",
@@ -37,48 +26,26 @@
"label": ".Team/Embedding",
"members": [
"WiNloSt",
"oisincoveney",
"npretto",
"heypoom",
"sanex3339"
"sanex3339",
"lorem--ipsum"
]
},
{
"name": "Workflows",
"label": ".Team/Workflows",
"members": [
"qnkhuat",
"piranha",
"crisptrutski",
"deniskaber",
"wotbrew",
"spalt08",
"stasgavrylov"
"spalt08"
]
},
{
"name": "Admin Webapp",
"label": ".Team/AdminWebapp",
"members": [
"npfitz",
"johnswanson",
"rafpaf",
"iethree",
"nvoxland",
"fraserdrops",
"edpaget"
]
},
{
"name": "DashViz",
"label": ".Team/DashViz",
"members": [
"alxnddr",
"kulyk",
"tsplude",
"lorem--ipsum",
"noahmoss",
"bpander"
"eliotmetabase"
]
},
{
@@ -86,27 +53,68 @@
"label": ".Team/DevEx",
"members": [
"camsaul",
"escherize"
"dpsutton",
"escherize",
"fraserdrops",
"nemanjaglumac"
]
},
{
"name": "Metabot",
"label": ".Team/Metabot",
"members": [
"appleby",
"noahmoss",
"retro",
"sloansparger",
"somtom"
"somtom",
"tsplude",
"lbrdnk"
]
},
{
"name": "Product Growth",
"label": ".Team/ProductGrowth",
"members": ["nemanjaglumac", "chodorowicz"]
},
{
"name": "Cloud",
"label": "cloud",
"members": []
"members": [
"filipesilva"
]
},
{
"name": "DashViz",
"label": ".Team/DashViz",
"members": [
"eliotmetabase"
]
},
{
"name": "UX West",
"label": ".Team/UXWest",
"members": [
"eliotmetabase",
"npfitz",
"johnswanson",
"iethree",
"nvoxland",
"edpaget",
"deniskaber",
"alxnddr",
"bpander",
"andsalves"
]
},
{
"name": "Gadget",
"label": ".Team/Gadget",
"members": [
"nmezzopera",
"bronsa",
"wotbrew",
"qnkhuat",
"chodorowicz",
"kamilmielnik",
"stasgavrylov",
"uladzimirdev"
]
}
]
}

View File

@@ -35,21 +35,21 @@ jobs:
build-static-viz: false
test-args: >-
:only '"enterprise/backend/test"'
exclude-tag: ':mb/driver-tests'
exclude-tag: ':mb/driver-tests :mb/transforms-python-test'
- name: EE App DB Tests (Part 1)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 0
exclude-tag: ':mb/driver-tests'
exclude-tag: ':mb/driver-tests :mb/transforms-python-test'
- name: EE App DB Tests (Part 2)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 1
exclude-tag: ':mb/driver-tests'
exclude-tag: ':mb/driver-tests :mb/transforms-python-test'
services:
mysql:
@@ -147,21 +147,21 @@ jobs:
build-static-viz: false
test-args: >-
:only '"enterprise/backend/test"'
exclude-tag: ':mb/driver-tests'
exclude-tag: ':mb/driver-tests :mb/transforms-python-test'
- name: EE App DB Tests (Part 1)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 0
exclude-tag: ':mb/driver-tests'
exclude-tag: ':mb/driver-tests :mb/transforms-python-test'
- name: EE App DB Tests (Part 2)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 1
exclude-tag: ':mb/driver-tests'
exclude-tag: ':mb/driver-tests :mb/transforms-python-test'
services:
mysql:
@@ -255,15 +255,11 @@ jobs:
env:
enable-ssl-tests: 'true'
job:
- name: Driver Tests
build-static-viz: false
test-args: >-
:only-tags [:mb/driver-tests]
- name: Enterprise Tests
build-static-viz: false
test-args: >-
:only '"enterprise/backend/test"'
exclude-tag: ':mb/driver-tests'
exclude-tag: ':mb/driver-tests :mb/transforms-python-test'
- name: EE App DB Tests (Part 1)
build-static-viz: true
test-args: >-
@@ -271,14 +267,14 @@ jobs:
:exclude-tags [:mb/driver-tests]
:partition/total 2
:partition/index 0
exclude-tag: ':mb/driver-tests'
exclude-tag: ':mb/driver-tests :mb/transforms-python-test'
- name: EE App DB Tests (Part 2)
build-static-viz: true
test-args: >-
:only '"test"'
:partition/total 2
:partition/index 1
exclude-tag: ':mb/driver-tests'
exclude-tag: ':mb/driver-tests :mb/transforms-python-test'
name: "${{ matrix.version.name }} ${{ matrix.job.name }}"
env:
# Only run old migrations tests on pushes to master or release branches. All other branches should skip tests

View File

@@ -23,7 +23,7 @@ jobs:
uses: actions/github-script@v7
with:
github-token: ${{ steps.generate-token.outputs.token }}
script: |
script: | #js
const fs = require('fs');
const teamConfig = JSON.parse(fs.readFileSync('.github/team.json', 'utf-8'));
const prAuthor = context.payload.pull_request.user.login;
@@ -65,10 +65,3 @@ jobs:
issue_number: prNumber,
labels: [team.label]
});
return team.projectUrl || null;
- uses: actions/add-to-project@v0.5.0
if: ${{ steps.auto-assign.outputs.result != 'null' }}
with:
project-url: ${{ steps.auto-assign.outputs.result }}
github-token: ${{ steps.generate-token.outputs.token }}

View File

@@ -6,11 +6,19 @@ on:
jobs:
create-backport:
if: | # the PR must be merged and have a backport label
if:
| # the PR must have a backport label when it's merged, or be labeled with a backport label after merge
github.event.pull_request.merged == true && (
contains(github.event.pull_request.labels.*.name, 'backport') ||
contains(github.event.pull_request.labels.*.name, 'double-backport') ||
contains(github.event.pull_request.labels.*.name, 'triple-backport')
github.event.action == 'closed' && (
contains(github.event.pull_request.labels.*.name, 'backport') ||
contains(github.event.pull_request.labels.*.name, 'double-backport') ||
contains(github.event.pull_request.labels.*.name, 'triple-backport')
) ||
github.event.action == 'labeled' && (
github.event.label.name == 'backport' ||
github.event.label.name == 'double-backport' ||
github.event.label.name == 'triple-backport'
)
)
runs-on: ubuntu-latest
steps:

View File

@@ -15,8 +15,6 @@ jobs:
- uses: actions/checkout@v4
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cloverage"
- name: Build static viz frontend
run: yarn build-static-viz
env:

View File

@@ -21,8 +21,6 @@ jobs:
- uses: actions/checkout@v4
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: 'kondo'
- name: Run clj-kondo
run: ./bin/mage kondo
@@ -35,8 +33,6 @@ jobs:
- uses: actions/checkout@v4
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "eastwood"
- run: clojure -X:dev:ee:ee-dev:drivers:drivers-dev:test:eastwood
name: Run Eastwood linter
@@ -51,11 +47,13 @@ jobs:
job:
- name: Enterprise Tests
edition: ee
test-group-name: ee
build-static-viz: 'false'
test-args: >-
:only '"enterprise/backend/test"'
- name: EE App DB Tests (Part 1)
edition: ee
test-group-name: ee-app-db-1
build-static-viz: 'true'
test-args: >-
:only '["test" ".clj-kondo/test"]'
@@ -63,6 +61,7 @@ jobs:
:partition/index 0
- name: EE App DB Tests (Part 2)
edition: ee
test-group-name: ee-app-db-2
build-static-viz: 'true'
test-args: >-
:only '["test" ".clj-kondo/test"]'
@@ -70,6 +69,7 @@ jobs:
:partition/index 1
- name: OSS App DB Tests (Part 1)
edition: oss
test-group-name: oss-app-db-1
build-static-viz: 'true'
test-args: >-
:only '["test" ".clj-kondo/test"]'
@@ -77,6 +77,7 @@ jobs:
:partition/index 0
- name: OSS App DB Tests (Part 2)
edition: oss
test-group-name: oss-app-db-2
build-static-viz: 'true'
test-args: >-
:only '["test" ".clj-kondo/test"]'
@@ -107,7 +108,6 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: be-tests
java-version: "${{ matrix.java-version }}"
# Depending on which files changed, we might either have to build static-viz
# from scratch or download the previously built artifact
@@ -154,10 +154,10 @@ jobs:
fail-on-error: false
- name: Upload Logs on Failure
if: failure()
if: always() && !success()
uses: actions/upload-artifact@v4
with:
name: test-logs-${{ matrix.java-version }}-${{ matrix.job.edition }}-${{ github.job }}
name: test-logs-${{ matrix.java-version }}-${{ matrix.job.edition }}-${{ github.job }}-${{ matrix.job.test-group-name }}
path: logs/test-log.json
retention-days: 1
@@ -175,8 +175,6 @@ jobs:
- uses: actions/checkout@v4
- name: Prepare backend
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: be-check
# TODO -- we should probably also check WITHOUT ee -- do a check with only OSS namespaces on the classpath
- name: Check namespaces
run: clojure -M:ee:drivers:check
@@ -190,8 +188,6 @@ jobs:
- uses: actions/checkout@v4
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: 'cljfmt'
- name: Run cljfmt
run: ./bin/mage cljfmt-all --force-check

View File

@@ -0,0 +1,14 @@
name: Block Master Branch PRs
on:
pull_request:
types: [opened, synchronize]
jobs:
check-source-branch:
runs-on: ubuntu-latest
steps:
- name: Block master branch PRs
if: github.head_ref == 'master'
run: |
echo "PRs from `master` branches are not allowed, please use a new branch name for your PR."
exit 1

View File

@@ -1,52 +0,0 @@
name: Bugs Slack Notification
on:
issues:
types:
- labeled
jobs:
on-issue-labeled:
runs-on: ubuntu-22.04
timeout-minutes: 5
if: |
github.event.label.name == '.Needs Triage' && contains(github.event.issue.labels.*.name, 'Type:Bug')
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: Check for labels containing team name
id: check_labels
run: |
labels_json=$(sed 's/&/\$/g' <<< '${{ toJson(github.event.issue.labels) }}')
echo "has_team_label=false" >> "$GITHUB_OUTPUT"
for label in "$labels_json"
do
if [[ $label == *".Team"* ]]; then
echo "Label contains the team name."
echo "has_team_label=true" >> "$GITHUB_OUTPUT"
break
fi
done
- name: Send the issue ${{ github.event.issue.number }} to Slack
id: slack
if: steps.check_labels.outputs.has_team_label == 'false'
uses: slackapi/slack-github-action@v1.26.0
with:
payload: |
{
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "${{ steps.vars.outputs.issue_title }}\n${{ github.event.issue.html_url }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_BUG_TRIAGE_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK

View File

@@ -16,8 +16,6 @@ jobs:
- name: Prepare back-end environment
timeout-minutes: 5
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: 'build-scripts'
- name: Run build and release script tests
run: clojure -X:dev:drivers:build:build-dev:build-test:ci

99
.github/workflows/cache-generator.yml vendored Normal file
View File

@@ -0,0 +1,99 @@
# This workflow is the single source of truth for generating and updating various caches used by our CI pipeline.
# It sets the fresh cache each Monday but provides a manual trigger to update it on-demand.
#
# All other jobs only restore from this cache; *they never update it*!
# They should always use `actions/cache/restore@v4` because `actions/cache@v4` would attempt to save the cache.
#
# Our agreed-upon strategy is to use a deterministic cache key based on the week of the year.
# Jobs can utilize the prior week's cache if the current week's cache is not found.
#
#
# PRINCIPLES:
# - The cache is never wrong!
# - Caches are immutable once created.
# - Caches are for speeding up builds, not for correctness.
# - It is faster to download a large cache than to re-resolve missing dependencies.
#
#
# DESIGN:
#
# 1. Prepare
# - A job first prepares the local environment (e.g., installs JDK, Clojure, Node.js, etc.)
# - This fetches the dependencies from the cache (if it exists) and warms up the local cache for this workflow.
# 2. Resolve
# - The next step pre-resolves all dependencies, ensuring that the local cache is fully populated and up-to-date.
# 3. Update
# - The final step saves the local cache back to GitHub Actions cache with a deterministic key.
# - If a cache entry already exists for that key, it is deleted first to ensure immutability.
#
name: Cache Generator
on:
schedule:
- cron: '0 3 * * 1' # Mondays at 03:00 UTC
workflow_dispatch: # manually update the cache
concurrency:
group: cache-generator
cancel-in-progress: true
jobs:
get-cache-keys:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Get cache keys
uses: ./.github/actions/get-cache-keys
id: get-cache-keys
outputs:
m2-cache-key: ${{ steps.get-cache-keys.outputs.m2-cache-key }}
node-cache-key: ${{ steps.get-cache-keys.outputs.node-cache-key }}
generate-m2-cache:
runs-on: ubuntu-22.04
timeout-minutes: 15
needs: get-cache-keys
env:
M2_CACHE_KEY: ${{ needs.get-cache-keys.outputs.m2-cache-key }}
steps:
- uses: actions/checkout@v4
- name: Prepare backend
uses: ./.github/actions/prepare-backend
# Add or remove aliases to affect the cache size and its contents.
# Adjust to taste, then redeploy this workflow.
- name: Pre-resolve dependencies
run: clojure -A:build:dev:ee:ee-dev:drivers:drivers-dev:cljs -P
- name: Update M2 cache
uses: ./.github/actions/update-cache
with:
path: |
~/.m2
~/.gitlibs
key: ${{ env.M2_CACHE_KEY }}
generate-node-modules-cache:
runs-on: ubuntu-22.04
timeout-minutes: 15
needs: get-cache-keys
env:
NODE_CACHE_KEY: ${{ needs.get-cache-keys.outputs.node-cache-key }}
steps:
- uses: actions/checkout@v4
# `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.
# IMPORTANT: Caching node_modules after patches are already applied will break any PR that attempts to either:
# - upgrade a patched library
# - change a patch
# Hence why we explicitly exclude patches from the cache (controlled by the `apply-patches` action input).
- name: Install front-end dependencies
uses: ./.github/actions/prepare-frontend
with:
apply-patches: 'false'
- name: Update node_modules cache
uses: ./.github/actions/update-cache
with:
path: node_modules
key: ${{ env.NODE_CACHE_KEY }}

View File

@@ -40,8 +40,6 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Compile CLJS
run: NODE_ENV=development yarn build-pure:cljs
- name: Publish to Chromatic

View File

@@ -0,0 +1,327 @@
name: "Claude Code Bug Fix"
on:
issues:
types:
- labeled
pull_request_review:
types:
- submitted
workflow_dispatch:
inputs:
issue_number:
description: "Issue number to fix"
required: true
type: string
override_employee_check:
description: "Override employee check for issue creator"
required: false
default: false
type: boolean
jobs:
auto-fix-bug:
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
if: |
(github.event_name == 'issues' && github.event.label.name == 'Claude Bug Fix' && github.event.issue.state == 'open') ||
(github.event_name == 'workflow_dispatch') ||
(github.event_name == 'pull_request_review' && github.event.review.state == 'changes_requested' && startsWith(github.event.pull_request.head.ref, 'claude-fix/'))
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Get issue data and check employee status
id: get_issue
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { getIssueData } = require('${{ github.workspace }}/.github/scripts/get-issue-data.js');
try {
const result = await getIssueData({
context,
github,
manualIssueNumber: '${{ github.event.inputs.issue_number }}'
});
const { issueNumber, issueData, employeeComments, prReviews, triggerType, isIssueAuthorEmployee } = result;
// Check employee status and fail if not authorized
if (!result.isIssueAuthorEmployee && '${{ github.event.inputs.override_employee_check }}' !== 'true') {
core.setFailed(`User ${result.issueData.user.login} is not a Metabase employee. Skipping bug fix automation.`);
}
core.setOutput('issue_number', issueNumber);
core.setOutput('issue_data', JSON.stringify(issueData));
core.setOutput('issue_comments', JSON.stringify(employeeComments));
core.setOutput('pr_reviews', JSON.stringify(prReviews));
core.setOutput('trigger_type', triggerType);
} catch (error) {
core.setFailed(error.message);
}
- name: Set up git configuration
run: |
git config --global user.name "Claude Code[bot]"
git config --global user.email "noreply@anthropic.com"
- name: Prepare issue context and bug fix prompt
id: prepare_prompt
uses: actions/github-script@v7
env:
ISSUE_DATA: ${{ steps.get_issue.outputs.issue_data }}
ISSUE_COMMENTS: ${{ steps.get_issue.outputs.issue_comments }}
PR_REVIEWS: ${{ steps.get_issue.outputs.pr_reviews }}
TRIGGER_TYPE: ${{ steps.get_issue.outputs.trigger_type }}
with:
script: |
const issueData = JSON.parse(process.env.ISSUE_DATA);
const issueComments = JSON.parse(process.env.ISSUE_COMMENTS);
const prReviews = JSON.parse(process.env.PR_REVIEWS);
const triggerType = process.env.TRIGGER_TYPE;
const issueNumber = '${{ steps.get_issue.outputs.issue_number }}';
// Convert issue title to kebab case and create branch name
const issueTitle = issueData.title || 'untitled';
const kebabTitle = issueTitle
.toLowerCase()
.replace(/[^a-z0-9]+/g, '-')
.replace(/^-+|-+$/g, '')
.replace(/-+/g, '-')
.substring(0, 50);
const branchName = `claude-fix/issue-${issueNumber}-${kebabTitle}`;
// Format data for bash environment
const formattedComments = issueComments.length > 0
? issueComments.map(comment =>
`**Comment by @${comment.user.login} on ${comment.created_at}:**\n${comment.body}`
).join('\n\n---\n\n')
: '';
const formattedReviews = prReviews.length > 0
? prReviews.map(review =>
`**Review by @${review.user.login} on ${review.submitted_at} (Changes Requested):**\n${review.body || 'No review comment provided'}`
).join('\n\n---\n\n')
: '';
core.exportVariable('BRANCH_NAME', branchName);
core.exportVariable('ISSUE_NUMBER', issueNumber);
core.exportVariable('ISSUE_TITLE', issueData.title);
core.exportVariable('ISSUE_AUTHOR', issueData.user.login);
core.exportVariable('ISSUE_CREATED', issueData.created_at);
core.exportVariable('ISSUE_BODY', issueData.body || 'No description provided');
core.exportVariable('ISSUE_COMMENTS_FORMATTED', formattedComments);
core.exportVariable('PR_REVIEWS_FORMATTED', formattedReviews);
core.exportVariable('TRIGGER_TYPE', triggerType);
- name: Generate bug fix prompt
run: |
cat << 'EOF' >> $GITHUB_ENV
BUG_FIX_PROMPT<<PROMPT_END
You are helping to fix a bug reported in GitHub issue #${{ env.ISSUE_NUMBER }}.
## Bug Report Details
**Title:** ${{ env.ISSUE_TITLE }}
**Reporter:** ${{ env.ISSUE_AUTHOR }}
**Created:** ${{ env.ISSUE_CREATED }}
**Description:**
${{ env.ISSUE_BODY }}
**Comments:**
${{ env.ISSUE_COMMENTS_FORMATTED }}
EOF
# Add review feedback section only if this is a review trigger
if [ "${{ env.TRIGGER_TYPE }}" = "pull_request_review" ]; then
cat << 'EOF' >> $GITHUB_ENV
## Previous Fix Attempt - Review Feedback (MUST ADDRESS)
Your previous automated fix attempt received the following feedback that needs to be addressed:
${{ env.PR_REVIEWS_FORMATTED }}
EOF
fi
# Add the rest of the prompt (always the same)
cat << 'EOF' >> $GITHUB_ENV
## Instructions
1. **Analyze the issue description and comments** - Understand what the issue is describing
a. Pay particular attention to reproduction steps and if there's an agreed upon fix.
2. **Search the codebase** - Use Grep and Glob tools to find relevant files
3. **Implement a fix** - Follow existing code patterns and conventions
4. **Test the fix** - Run appropriate tests using the commands in CLAUDE.md:
- JavaScript/TypeScript: `yarn test-unit path/to/file.unit.spec.js`
- Clojure: `clojure -X:dev:test :only namespace/test-name`
- Lint: `yarn lint-eslint-pure` for JS/TS, `./bin/mage kondo <file>` for Clojure
5. **Verify the fix** - Ensure tests pass and code follows conventions
## Important Guidelines
- Follow the development patterns in CLAUDE.md
- Write failing tests first, then fix them
- Work in small, testable increments
- Don't commit changes - leave that for the workflow
- IMPORTANT: Focus only on fixing the reported bug, don't make unrelated changes
## Scratchpad Directory
A `.claude-scratchpad/` directory has been created for your temporary files:
- Use this directory for ALL temporary verification files. However, prefer using production test files rather than adhoc ones.
- Only modify actual production code in the main repository directories
- The scratchpad will be cleaned up automatically - nothing from it will be committed
Start by understanding the bug and then systematically work toward a solution.
PROMPT_END
EOF
- name: Determine branch strategy
run: |
BRANCH_NAME="${{ env.BRANCH_NAME }}"
if git branch -r --list "origin/${BRANCH_NAME}" | grep -q .; then
echo "Branch already exists: $BRANCH_NAME"
echo "Will push to existing branch and skip PR creation"
echo "BRANCH_EXISTS=true" >> $GITHUB_ENV
else
echo "Creating new branch: $BRANCH_NAME"
echo "Will create new PR"
echo "BRANCH_EXISTS=false" >> $GITHUB_ENV
fi
# Export the branch name
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
- name: Create scratchpad directory for Claude
run: |
# Create a scratchpad directory for Claude to use for temporary files
mkdir -p .claude-scratchpad
echo "Scratchpad directory created for Claude's temporary verification files"
- 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 }}
- name: Generate Bug Fix with Claude Code
uses: anthropics/claude-code-action@beta
with:
mode: agent
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ steps.claude-app-token.outputs.token }}
direct_prompt: ${{ env.BUG_FIX_PROMPT }}
timeout_minutes: "25"
allowed_tools: "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"
disallowed_tools: "Bash(git commit*),Bash(git push*),Bash(gh*)"
- name: Clean up scratchpad directory
run: |
# Remove the scratchpad directory so its contents don't get committed
rm -rf .claude-scratchpad/
# Remove output file generated by Claude Code action
rm -f output.txt
echo "Scratchpad directory and action output files cleaned up"
- name: Check for changes and analysis
id: check_changes
run: |
# Now check for actual code changes (excluding analysis file)
if [ -n "$(git status --porcelain)" ]; then
echo "has_changes=true" >> $GITHUB_OUTPUT
echo "Changes detected:"
git status --short
else
echo "has_changes=false" >> $GITHUB_OUTPUT
echo "No changes made by Claude."
fi
- name: Get issue team labels and prepare reviewers
if: steps.check_changes.outputs.has_changes == 'true'
id: prepare_reviewers
uses: actions/github-script@v7
env:
ISSUE_DATA: ${{ steps.get_issue.outputs.issue_data }}
with:
script: |
const issueData = JSON.parse(process.env.ISSUE_DATA);
const issueLabels = issueData.labels.map(label => label.name);
const teamLabels = issueLabels.filter(label => label.startsWith('.Team/'));
const issueCreator = issueData.user.login;
core.setOutput('team_labels', teamLabels.join(','));
core.setOutput('reviewers', issueCreator);
- name: Create Pull Request
if: steps.check_changes.outputs.has_changes == 'true'
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ env.BRANCH_NAME }}
base: master
commit-message: |
Fix: ${{ env.ISSUE_TITLE }}
Fixes #${{ env.ISSUE_NUMBER }}
🤖 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: ${{ env.ISSUE_TITLE }}"
body: |
This PR automatically fixes the bug reported in #${{ env.ISSUE_NUMBER }}.
## Bug Report
**Original Issue:** #${{ env.ISSUE_NUMBER }}
**Reporter:** @${{ env.ISSUE_AUTHOR }}
**Issue Title:** ${{ env.ISSUE_TITLE }}
## Automated Fix
🤖 This fix was generated automatically by Claude Code based on the issue description.
**Please review carefully:**
- [ ] The fix addresses the reported issue
- [ ] Tests pass and code follows conventions
- [ ] No unrelated changes were introduced
- [ ] The solution is appropriate and maintainable
## Next Steps
- Review the changes and test thoroughly
- If the fix looks good, approve and merge
- If issues are found, either fix them or close this PR
---
Closes #${{ env.ISSUE_NUMBER }}
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
labels: |
${{ steps.prepare_reviewers.outputs.team_labels }}
automated-fix
ci skip
reviewers: ${{ steps.prepare_reviewers.outputs.reviewers }}
- name: Log existing branch update
if: steps.check_changes.outputs.has_changes == 'true' && env.BRANCH_EXISTS == 'true'
uses: actions/github-script@v7
with:
script: |
console.log('🔄 Updated existing branch: ${{ env.BRANCH_NAME }}');
console.log('The changes have been pushed to the existing PR for this issue.');
- name: Log analysis for no changes
if: steps.check_changes.outputs.has_changes == 'false'
uses: actions/github-script@v7
with:
script: |
console.log('🤖 No code changes were made by Claude.');

View File

@@ -0,0 +1,92 @@
name: "Claude Code Review"
on:
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}-claude-code-review
cancel-in-progress: true
jobs:
review:
if: github.event.pull_request.draft == false
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 with a focus on:
- Compliance with project coding standards and conventions
- Code quality and best practices
- Clear and correct docstrings
- Clear and correct comments explaining what the code is doing
DO NOT post any comments confirming that something is correct or congratulating someone for following our
guidelines -- only post comments for style violations or concerns.
Follow additional guidelines in the "Code Review Guidelines" section of CLAUDE.md .
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,21 +0,0 @@
name: Claude Assistant
on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]
issues:
types: [opened, assigned, labeled]
pull_request_review:
types: [submitted]
jobs:
claude-response:
runs-on: ubuntu-latest
steps:
- run: git config --global --add safe.directory /__w/metabase/metabase
- uses: actions/checkout@v4
- uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
github_token: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -38,7 +38,5 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: 'cljs'
- name: Run Cljs tests for shared/ code
- name: Run Cljs tests
run: yarn run test-cljs

View File

@@ -0,0 +1,126 @@
name: Containerize Uberjar
on:
workflow_call:
workflow_dispatch:
jobs:
get-container-info:
runs-on: ubuntu-22.04
timeout-minutes: 5
name: Get container info
outputs:
editions: ${{ steps.ee-info.outputs.editions }}
ee: ${{ toJson(fromJson(steps.build-matrix.outputs.result).ee) }}
oss: ${{ toJson(fromJson(steps.build-matrix.outputs.result).oss) }}
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Get EE Docker info
id: ee-info
uses: ./.github/actions/get-docker-info
with:
edition: ee
- name: Get OSS Docker info
id: oss-info
uses: ./.github/actions/get-docker-info
with:
edition: oss
- name: Build matrix info
id: build-matrix
uses: actions/github-script@v7
with:
script: | # js
const editions = JSON.parse('${{ steps.ee-info.outputs.editions }}');
const result = {
editions: editions,
ee: {
repo: '${{ steps.ee-info.outputs.repo }}',
tag: '${{ steps.ee-info.outputs.tag }}'
},
oss: {
repo: '${{ steps.oss-info.outputs.repo }}',
tag: '${{ steps.oss-info.outputs.tag }}'
}
};
console.log('Build matrix:', result);
return result;
containerize:
needs: [get-container-info]
if: needs.get-container-info.result == 'success'
strategy:
matrix:
edition: ${{ fromJson(needs.get-container-info.outputs.editions) }}
uses: ./.github/workflows/containerize-jar.yml
secrets: inherit
with:
artifact-name: metabase-${{ matrix.edition }}-${{ github.event.inputs.commit || github.event.pull_request.head.sha || github.sha }}-uberjar
commit: ${{ github.event.inputs.commit || github.sha }}
repo: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).repo }}
tag: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).tag }}
release: "false"
build-args: |
GIT_COMMIT_SHA=${{ github.event.inputs.commit || github.sha }}
run-trivy:
needs: [get-container-info, containerize]
strategy:
matrix:
edition: ${{ fromJson(needs.get-container-info.outputs.editions) }}
runs-on: ubuntu-22.04
name: Run Trivy vulnerability scanner
steps:
- name: Check out the code
uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.commit || github.sha }}
- name: Run Trivy vulnerability scanner
uses: aquasecurity/trivy-action@0.29.0
env:
TRIVY_OFFLINE_SCAN: true
repo: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).repo }}
tag: ${{ fromJson(needs.get-container-info.outputs[matrix.edition]).tag }}
with:
image-ref: docker.io/${{ env.repo }}:${{ env.tag }}
format: sarif
output: trivy-results.sarif
version: "v0.57.1"
- name: Upload Trivy scan results to GitHub Security tab
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: "trivy-results.sarif"
post-comment:
needs: [get-container-info, containerize]
if: github.event_name == 'pull_request'
runs-on: ubuntu-22.04
name: Post PR comment
steps:
- name: Check out the code
uses: actions/checkout@v4
- name: Get Docker info for comment
id: docker-info
uses: ./.github/actions/get-docker-info
with:
branch: ${{ github.head_ref || github.ref_name }}
edition: ee
- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@v2
with:
header: docker-build-status
message: |
✅ Docker build completed for commit ${{ github.event.pull_request.head.sha || github.sha }}
The uberjar has been built and containerized successfully.
**Branch:** `${{ github.head_ref || github.ref_name }}`
**Docker Image:** `${{ steps.docker-info.outputs.full_image }}`
**Docker Hub:** [View on Docker Hub](https://hub.docker.com/r/${{ steps.docker-info.outputs.repo }}/tags?name=${{ steps.docker-info.outputs.tag }})
**Triggered by:** @${{ github.actor }}
Pull the image:
```bash
docker pull ${{ steps.docker-info.outputs.full_image }}
```

View File

@@ -4,39 +4,53 @@ on:
pull_request:
branches:
- master
paths:
- enterprise/frontend/src/embedding-sdk/**
jobs:
files-changed:
name: Check which files changed
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
frontend_embedding_sources: ${{ steps.changes.outputs.frontend_embedding_sources }}
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
pr-title-reminder:
runs-on: ubuntu-22.04
timeout-minutes: 5
permissions:
pull-requests: write
needs: [ files-changed ]
if: |
!cancelled() &&
needs.files-changed.outputs.frontend_embedding_sources == 'true'
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Check if the PR title is already following Conventional Commits style
uses: actions/github-script@v7
id: is-conventional-commit
with:
result-encoding: string
script: | # js
const { isConventionalTitle } = require(".github/scripts/conventional-commit-pr-title-reminder/utils.js")
const pullRequestTitle = context.payload.pull_request.title
const conventionalCommitRegex = /^(?<type>\w+)\((?<scope>\w+)\):/
const match = pullRequestTitle.match(conventionalCommitRegex)
if (match) {
const { type, scope } = match.groups
return ['feat', 'fix', 'perf', 'docs', 'style', 'refactor', 'test', 'build', 'ci'].includes(type) && scope === 'sdk'
}
- name: Checkout repository so `gh` CLI works
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
return isConventionalTitle(pullRequestTitle)
- name: Remind PR authors to use conventional commit in the title
if: ${{ steps.is-conventional-commit.outputs.result != 'true' }}
uses: actions/github-script@v7
with:
script: |
const { updateComment } = require(".github/scripts/conventional-commit-pr-title-reminder/utils.js")
await updateComment({github, context})
script: | #js
const { updateCommentForEmbedding } = require(".github/scripts/conventional-commit-pr-title-reminder/utils.js")
await updateCommentForEmbedding({github, context})

29
.github/workflows/coverage.yml vendored Normal file
View File

@@ -0,0 +1,29 @@
name: Frontend Test Coverage
on:
workflow_dispatch:
schedule:
- cron: '40 1 * * *' # every day at 1:40
jobs:
fe-test-coverage:
runs-on: ubuntu-22.04
timeout-minutes: 60
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: Run frontend unit tests
run: |
yarn run test-unit \
--silent \
--coverage \
--testTimeout=60000
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v5
with:
files: ./coverage/lcov.info
flags: front-end
token: ${{ secrets.CODECOV_TOKEN }}

176
.github/workflows/docs-generate-base.yml vendored Normal file
View File

@@ -0,0 +1,176 @@
# .github/workflows/reusable-doc-update.yml
name: Reusable - Update Documentation
# This workflow is designed to be called by other workflows.
on:
workflow_call:
inputs:
target_branch:
description: "The branch to check out and create a PR against"
required: true
type: string
secrets:
automation_token:
description: "A token with permissions to create branches and PRs"
required: true
permissions:
contents: write
pull-requests: write
jobs:
update-docs:
name: Update documentation for ${{ inputs.target_branch }}
runs-on: ubuntu-22.04
timeout-minutes: 30
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.automation_token }}
ref: ${{ inputs.target_branch }}
- name: Prepare backend environment
uses: ./.github/actions/prepare-backend
- name: Generate environment variables documentation
id: generate_env_docs
run: |
set -e # Exit on any error
# Ensure we're on the target branch for documentation generation
git checkout ${{ inputs.target_branch }}
echo "Generating environment variables documentation from branch: ${{ inputs.target_branch }}"
clojure -M:ee:doc environment-variables-documentation
continue-on-error: false
- name: Generate config template documentation
id: generate_config_docs
run: |
set -e # Exit on any error
echo "Generating config template documentation..."
clojure -M:ee:doc config-template
continue-on-error: false
- name: Generate API documentation
id: generate_api_docs
run: |
set -e # Exit on any error
echo "Generating API documentation..."
clojure -M:ee:doc api-documentation
continue-on-error: false
- name: Check for changes
id: check_changes
run: |
if git diff --quiet docs/; then
echo "changes=false" >> $GITHUB_OUTPUT
echo "No changes detected in docs directory"
else
echo "changes=true" >> $GITHUB_OUTPUT
echo "Changes detected in docs directory"
fi
- name: Create branch and commit changes
id: commit_and_push
if: steps.check_changes.outputs.changes == 'true'
run: |
git config user.name github-actions
git config user.email github-actions@github.com
BRANCH_NAME="docs/auto-update-${{ inputs.target_branch }}-$(date +%Y-%m-%d-%H%M%S)"
echo "Creating branch: $BRANCH_NAME"
# Create and switch to new branch from current target branch
git checkout -b "$BRANCH_NAME"
# Stage and commit changes
git add docs/
if git diff --cached --quiet; then
echo "No changes to commit"
exit 1
fi
git commit -m "Update generated docs (${{ inputs.target_branch }})" --no-verify
git push -u origin "$BRANCH_NAME"
echo "branch_name=$BRANCH_NAME" >> $GITHUB_OUTPUT
echo "Successfully created and pushed branch"
- name: Create pull request
id: create_pr
if: steps.check_changes.outputs.changes == 'true'
env:
GITHUB_TOKEN: ${{ secrets.automation_token }}
GH_REPO: ${{ github.repository }}
run: |
CHANGES_SUMMARY=$(git diff --name-only HEAD~1 docs/ 2>/dev/null | head -10 | sed 's/^/- /' || echo "- No specific files detected")
TOTAL_CHANGES=$(git diff --name-only HEAD~1 docs/ 2>/dev/null | wc -l || echo "0")
BRANCH_NAME="${{ steps.commit_and_push.outputs.branch_name }}"
echo "Creating PR with branch: $BRANCH_NAME"
echo "Changes detected: $TOTAL_CHANGES files"
for i in {1..3}; do
echo "Attempt $i of 3..."
if gh pr create \
--base "${{ inputs.target_branch }}" \
--head "$BRANCH_NAME" \
--title "Auto-update documentation for ${{ inputs.target_branch }}" \
--body "This PR contains automatically generated documentation updates.
## Changes detected
The following documentation files were updated:
$CHANGES_SUMMARY
$([ "$TOTAL_CHANGES" -gt 10 ] && echo "- ... and $((TOTAL_CHANGES - 10)) more files")
## Generation commands
Documentation was generated using:
- \`clojure -M:ee:doc environment-variables-documentation\`
- \`clojure -M:ee:doc config-template\`
- \`clojure -M:ee:doc api-documentation\`
Please review the changes and merge if they look correct." \
--label "Type:Documentation" \
--label "no-backport" \
--reviewer "metabase/tech-writers"; then
echo "PR created successfully on attempt $i"
break
else
echo "PR creation failed on attempt $i"
if [ $i -eq 3 ]; then
echo "All attempts failed. Exiting with error."
exit 1
fi
echo "Waiting 10 seconds before retry..."
sleep 10
fi
done
- name: Skip PR creation
if: steps.check_changes.outputs.changes == 'false'
run: |
echo "No documentation changes detected, skipping PR creation"
- name: Workflow summary
if: always()
run: |
if [ "${{ steps.check_changes.outputs.changes }}" == "true" ]; then
if [ "${{ steps.commit_and_push.outcome }}" == "success" ]; then
if [ "${{ steps.create_pr.outcome }}" == "success" ]; then
echo "## ✅ Documentation Updated Successfully" >> $GITHUB_STEP_SUMMARY
echo "- Branch: \`${{ steps.commit_and_push.outputs.branch_name }}\`" >> $GITHUB_STEP_SUMMARY
echo "- PR created targeting **${{ inputs.target_branch }}**" >> $GITHUB_STEP_SUMMARY
else
echo "## ⚠️ Branch Created but PR Failed" >> $GITHUB_STEP_SUMMARY
echo "- Branch: \`${{ steps.commit_and_push.outputs.branch_name }}\`" >> $GITHUB_STEP_SUMMARY
echo "- Manual PR creation required" >> $GITHUB_STEP_SUMMARY
fi
else
echo "## ❌ Failed to Create Branch" >> $GITHUB_STEP_SUMMARY
echo "- Check workflow logs for details" >> $GITHUB_STEP_SUMMARY
fi
else
echo "## ℹ️ No Changes Detected" >> $GITHUB_STEP_SUMMARY
echo "- Documentation is up to date on **${{ inputs.target_branch }}**" >> $GITHUB_STEP_SUMMARY
fi

36
.github/workflows/docs-links.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Check doc links
on:
pull_request:
paths:
- "docs/**"
workflow_dispatch:
jobs:
link-checker:
name: Check documentation links
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
sparse-checkout: |
docs
.lychee
- name: Cache lychee
uses: actions/cache@v3
with:
path: ~/.cache/lychee
key: lychee-${{ runner.os }}-${{ hashFiles('.lychee/config.toml') }}
- name: Run link checker
id: link-check
uses: lycheeverse/lychee-action@v2
with:
fail: true
args: docs --config ./.lychee/config.toml --offline
format: markdown

View File

@@ -0,0 +1,15 @@
name: Auto-update documentation (master)
on:
schedule:
- cron: "0 1 * * 1-5" # Every Monday through Friday at 1 AM UTC
workflow_dispatch:
jobs:
update-master-docs:
name: Call documentation update for master
uses: ./.github/workflows/docs-generate-base.yml
with:
target_branch: "master"
secrets:
automation_token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}

View File

@@ -0,0 +1,15 @@
name: Auto-update documentation (release)
on:
schedule:
- cron: "0 2 * * 1-5" # Every Monday through Friday at 2 AM UTC
workflow_dispatch:
jobs:
update-release-docs:
name: Call documentation update for release branch
uses: ./.github/workflows/docs-generate-base.yml
with:
target_branch: "release-x.56.x"
secrets:
automation_token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}

View File

@@ -1,44 +0,0 @@
name: Docs Bump Detected
on:
pull_request_target:
types:
- opened
- synchronize
- reopened
branches:
- 'master'
- 'release-x.[0-9]+.x'
paths:
- 'docs/**'
jobs:
push_workflow_to_docs_metabase_github_io_job:
runs-on: ubuntu-latest
env:
SOURCE_BRANCH: ${{ github.head_ref || github.ref }}
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
PR_NUMBER: ${{ github.event.pull_request.number }}
steps:
- name: Report changed docs files exist
run: |
echo "A PR with changes in the docs directory was detected."
echo "Sending workflow trigger to create/update the corresponding PR in docs repo."
echo "source branch: $SOURCE_BRANCH"
echo "target branch: $TARGET_BRANCH"
echo "pr number: $PR_NUMBER"
- name: Trigger repo dispatch
uses: actions/github-script@v7
with:
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
script: | #js
github.rest.repos.createDispatchEvent({
owner: "${{ github.repository_owner }}",
repo: "docs.metabase.github.io",
event_type: "docs_update",
client_payload: {
dispatch_type: "docs_update",
source_branch: process.env.SOURCE_BRANCH,
target_branch: process.env.TARGET_BRANCH,
pr_number: process.env.PR_NUMBER}});

View File

@@ -1,43 +0,0 @@
name: Docs Close Detected
on:
pull_request:
types:
- closed
branches:
- 'master'
- 'release-x.[0-9]+.x'
paths:
- 'docs/**'
jobs:
push_and_merge_workflow_to_docs_metabase_github_io_job:
if: github.event.pull_request.merged == false
runs-on: ubuntu-latest
env:
SOURCE_BRANCH: ${{ github.head_ref || github.ref }}
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
PR_NUMBER: ${{ github.event.pull_request.number }}
steps:
- name: Report changed docs files exist
run: |
echo "A PR with changes to the docs directory was closed."
echo "Sending workflow trigger to close corresponding PR in docs repo."
echo "source branch: $SOURCE_BRANCH"
echo "target branch: $TARGET_BRANCH"
echo "pr number: $PR_NUMBER"
- name: Trigger repo dispatch
uses: actions/github-script@v7
with:
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
script: | #js
github.rest.repos.createDispatchEvent({
owner: "${{ github.repository_owner }}",
repo: "docs.metabase.github.io",
event_type: "docs_close",
client_payload: {
dispatch_type: "docs_close",
source_branch: process.env.SOURCE_BRANCH,
target_branch: process.env.TARGET_BRANCH,
pr_number: process.env.PR_NUMBER}});

View File

@@ -1,43 +0,0 @@
name: Docs Merge Detected
on:
pull_request:
types:
- closed
branches:
- 'master'
- 'release-x.[0-9]+.x'
paths:
- 'docs/**'
jobs:
push_and_merge_workflow_to_docs_metabase_github_io_job:
if: github.event.pull_request.merged == true
runs-on: ubuntu-latest
env:
SOURCE_BRANCH: ${{ github.head_ref || github.ref }}
TARGET_BRANCH: ${{ github.event.pull_request.base.ref }}
PR_NUMBER: ${{ github.event.pull_request.number }}
steps:
- name: Report changed docs files exist
run: |
echo "A PR with changes to the docs directory was merged."
echo "Sending workflow trigger to merge corresponding PR in docs repo."
echo "source branch: $SOURCE_BRANCH"
echo "target branch: $TARGET_BRANCH"
echo "pr number: $PR_NUMBER"
- name: Trigger repo dispatch
uses: actions/github-script@v7
with:
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
script: | #js
github.rest.repos.createDispatchEvent({
owner: "${{ github.repository_owner }}",
repo: "docs.metabase.github.io",
event_type: "docs_merge",
client_payload: {
dispatch_type: "docs_merge",
source_branch: process.env.SOURCE_BRANCH,
target_branch: process.env.TARGET_BRANCH,
pr_number: process.env.PR_NUMBER}});

View File

@@ -689,18 +689,51 @@ jobs:
junit-name: 'be-tests-starburst-ee'
test-args: ":only ${{ inputs.test }} :times ${{ inputs.times }}"
login-to-ecr:
if: inputs.driver == 'Vertica'
runs-on: ubuntu-22.04
timeout-minutes: 15
permissions:
id-token: write
contents: read
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ secrets.CI_IAM_ROLE }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: us-east-1
- name: Get ECR password
id: login-ecr
run: |
PASSWORD=$(aws ecr get-login-password --region us-east-1)
REGISTRY="$(aws sts get-caller-identity --query Account --output text).dkr.ecr.us-east-1.amazonaws.com"
echo "docker_username=AWS" >> $GITHUB_OUTPUT
echo "docker_password=$PASSWORD" >> $GITHUB_OUTPUT
echo "registry=$REGISTRY" >> $GITHUB_OUTPUT
outputs:
registry: ${{ steps.login-ecr.outputs.registry }}
docker_username: ${{ steps.login-ecr.outputs.docker_username }}
docker_password: ${{ steps.login-ecr.outputs.docker_password }}
be-tests-vertica-ee:
if: inputs.driver == 'Vertica'
runs-on: ubuntu-22.04
needs: login-to-ecr
timeout-minutes: 90
env:
CI: 'true'
DRIVERS: vertica
services:
vertica:
image: vertica/vertica-ce:12.0.2-0
image: ${{ needs.login-to-ecr.outputs.registry }}/vertica-ce:25.3.0-0
ports:
- "5433:5433"
credentials:
username: ${{ needs.login-to-ecr.outputs.docker_username }}
password: ${{ needs.login-to-ecr.outputs.docker_password }}
steps:
- uses: actions/checkout@v4
- name: Make plugins directory

View File

@@ -21,11 +21,17 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Fetch base branch
if: github.event_name == 'pull_request' && github.event.pull_request.base.ref != ''
run: |
# Fetch the base branch to ensure its history is available for diffing
git fetch origin ${{ github.event.pull_request.base.ref }}:${{ github.event.pull_request.base.ref }}
# Only run this if it's a pull request and the base ref exists
- name: Check if tier3 drivers should run
id: check_team_and_branch
run: |
IS_MASTER_OR_RELEASE="${{ github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/heads/release-') }}"
HAS_TEAM_LABEL="${{ contains(github.event.pull_request.labels.*.name, '.Team/Drivers') || contains(github.event.pull_request.labels.*.name, '.Team/Querying') || contains(github.event.pull_request.labels.*.name, '.Team/SemanticLayer') }}"
HAS_TEAM_LABEL="${{ contains(github.event.pull_request.labels.*.name, '.Team/Drivers') || contains(github.event.pull_request.labels.*.name, '.Team/Querying') || contains(github.event.pull_request.labels.*.name, '.Team/SemanticLayer') || contains(github.event.pull_request.labels.*.name, '.Team/DevEx') }}"
echo "Is master or release: ${IS_MASTER_OR_RELEASE}"
@@ -37,8 +43,25 @@ jobs:
echo "skip=false" >> $GITHUB_OUTPUT
echo "A relevant team label is present. Tier 3 driver tests will run."
else
echo "skip=true" >> $GITHUB_OUTPUT
echo "Not labeled with required team and not merging into master/release. Tier 3 driver tests will be skipped."
echo "Checking for changes in relevant folders..."
CHANGED_FILES=$(git diff --name-only $(git merge-base ${{ github.event.pull_request.base.sha }} ${{ github.sha }}) ${{ github.sha }})
# Initialize an empty array to store folders with changes
CHANGED_FOLDERS=()
for folder in "src/metabase/lib" "src/metabase/query_processor" "modules/drivers" "src/metabase/driver"; do
if echo "$CHANGED_FILES" | grep -q "$folder"; then
CHANGED_FOLDERS+=("$folder")
fi
done
if [[ ${#CHANGED_FOLDERS[@]} -gt 0 ]]; then
echo "skip=false" >> $GITHUB_OUTPUT
echo "Changes detected in the following folders: ${CHANGED_FOLDERS[*]}."
echo "Tier 3 driver tests will run."
else
echo "skip=true" >> $GITHUB_OUTPUT
echo "No relevant team label, not merging into master/release, and no changes in relevant folders. Tier 3 driver tests will be skipped."
fi
fi
shell: bash
be-tests-athena-ee:
@@ -50,9 +73,11 @@ jobs:
CI: 'true'
DRIVERS: athena
MB_ATHENA_TEST_REGION: us-east-1
MB_ATHENA_TEST_REGION_ROUTING: us-east-2
MB_ATHENA_TEST_ACCESS_KEY: ${{ secrets.MB_ATHENA_TEST_ACCESS_KEY }}
MB_ATHENA_TEST_SECRET_KEY: ${{ secrets.MB_ATHENA_TEST_SECRET_KEY }}
MB_ATHENA_TEST_S3_STAGING_DIR: ${{ secrets.MB_ATHENA_TEST_S3_STAGING_DIR }}
MB_ATHENA_TEST_S3_STAGING_DIR_ROUTING: ${{ secrets.MB_ATHENA_TEST_S3_STAGING_DIR_ROUTING }}
# These credentials are used to test the driver when the user does not have the athena:GetTableMetadata permission
MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_ACCESS_KEY: ${{ secrets.MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_ACCESS_KEY }}
MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_SECRET_KEY: ${{ secrets.MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_SECRET_KEY }}
@@ -65,6 +90,7 @@ jobs:
junit-name: 'be-tests-athena-ee'
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()
@@ -81,6 +107,19 @@ jobs:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
job:
- name: Driver Tests
test-args: >-
:only-tags [:mb/driver-tests]
:exclude-tags [:mb/transforms-python-test]
# DS 2025-09-26 temporarily disabled while we diagnose flakes
# - name: Transforms Python Tests
# test-args: >-
# :only-tags [:mb/transforms-python-test]
# needs-python-runner: true
env:
CI: 'true'
DRIVERS: bigquery-cloud-sdk
@@ -90,15 +129,21 @@ jobs:
MB_BIGQUERY_TEST_ACCESS_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_ACCESS_TOKEN }}
MB_BIGQUERY_TEST_REFRESH_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_REFRESH_TOKEN }}
MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON: ${{ secrets.MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON }}
name: BigQuery
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:
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
uses: ./.github/actions/setup-python-runner
with:
metabase-automation-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: Test BigQuery Cloud SDK driver
id: test-driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-bigquery-cloud-sdk-ee'
test-args: >-
:only-tags [:mb/driver-tests]
test-args: ${{ matrix.job.test-args }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
@@ -110,11 +155,29 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
- name: Cleanup python-runner
if: ${{ always() && matrix.job.needs-python-runner == true }}
uses: ./.github/actions/cleanup-python-runner
with:
upload-logs: ${{ steps.test-driver.outcome == 'failure' }}
logs-artifact-suffix: ${{ matrix.job.name }} ${{ matrix.version.name }}
be-tests-clickhouse-ee:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
strategy:
fail-fast: false
matrix:
job:
- name: Driver Tests
test-args: >-
:only-tags [:mb/driver-tests]
:exclude-tags [:mb/transforms-python-test]
- name: Transforms Python Tests
test-args: >-
:only-tags [:mb/transforms-python-test]
needs-python-runner: true
env:
CI: 'true'
DRIVERS: clickhouse
@@ -122,9 +185,14 @@ jobs:
MB_CLICKHOUSE_TEST_PORT: 8123
MB_CLICKHOUSE_TEST_OLD_PORT: 8124
MB_CLICKHOUSE_TEST_NGINX_PORT: 8127
name: Clickhouse
name: Clickhouse ${{ matrix.job.name }}
steps:
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
uses: ./.github/actions/setup-python-runner
with:
metabase-automation-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: Add ClickHouse TLS instance to /etc/hosts
run: |
sudo echo "127.0.0.1 server.clickhouseconnect.test" | sudo tee -a /etc/hosts
@@ -141,11 +209,11 @@ jobs:
clickhouse_cluster_node2
nginx
- name: Test Clickhouse driver
id: test-driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-clickhouse-ee'
test-args: >-
:only-tags [:mb/driver-tests]
test-args: ${{ matrix.job.test-args }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
@@ -157,6 +225,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 }}
- name: Cleanup python-runner
if: ${{ always() && matrix.job.needs-python-runner == true }}
uses: ./.github/actions/cleanup-python-runner
with:
upload-logs: ${{ steps.test-driver.outcome == 'failure' }}
logs-artifact-suffix: ${{ matrix.job.name }} ${{ matrix.version.name }}
be-tests-druid-ee:
needs: determine-driver-skips
@@ -182,6 +256,7 @@ jobs:
junit-name: 'be-tests-druid-ee'
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()
@@ -218,6 +293,7 @@ jobs:
junit-name: 'be-tests-druid-jdbc-ee'
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()
@@ -242,6 +318,7 @@ jobs:
MB_DATABRICKS_TEST_HTTP_PATH: ${{ secrets.MB_DATABRICKS_JDBC_TEST_HTTP_PATH }}
MB_DATABRICKS_TEST_TOKEN: ${{ secrets.MB_DATABRICKS_JDBC_TEST_TOKEN }}
MB_DATABRICKS_TEST_CATALOG: 'metabase_ci'
MB_DATABRICKS_TEST_CATALOG_ROUTING: 'metabase_routing_catalog'
MB_DATABRICKS_TEST_CLIENT_ID: ${{ secrets.MB_DATABRICKS_JDBC_TEST_CLIENT_ID }}
MB_DATABRICKS_TEST_OAUTH_SECRET: ${{ secrets.MB_DATABRICKS_JDBC_TEST_OAUTH_SECRET }}
name: Databricks
@@ -253,6 +330,7 @@ jobs:
junit-name: 'be-tests-databricks-ee'
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()
@@ -278,6 +356,7 @@ jobs:
MB_DATABRICKS_TEST_HTTP_PATH: ${{ secrets.MB_DATABRICKS_JDBC_TEST_HTTP_PATH }}
MB_DATABRICKS_TEST_TOKEN: ${{ secrets.MB_DATABRICKS_JDBC_TEST_TOKEN }}
MB_DATABRICKS_TEST_CATALOG: 'metabase_ci'
MB_DATABRICKS_TEST_CATALOG_ROUTING: 'metabase_routing_catalog'
MB_DATABRICKS_TEST_CLIENT_ID: ${{ secrets.MB_DATABRICKS_JDBC_TEST_CLIENT_ID }}
MB_DATABRICKS_TEST_OAUTH_SECRET: ${{ secrets.MB_DATABRICKS_JDBC_TEST_OAUTH_SECRET }}
name: Databricks (Multi-Catalog)
@@ -289,6 +368,7 @@ jobs:
junit-name: 'be-tests-databricks-multi-catalog-ee'
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()
@@ -310,12 +390,18 @@ jobs:
name: H2
steps:
- uses: actions/checkout@v4
- name: Setup python-runner
uses: ./.github/actions/setup-python-runner
with:
metabase-automation-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: Test H2 driver
id: test-driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-h2'
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()
@@ -327,6 +413,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 }}
- name: Cleanup python-runner
if: always()
uses: ./.github/actions/cleanup-python-runner
with:
upload-logs: ${{ steps.test-driver.outcome == 'failure' }}
logs-artifact-suffix: ${{ matrix.job.name }} ${{ matrix.version.name }}
be-tests-mysql-mariadb:
if: ${{ !inputs.skip }}
@@ -360,6 +452,11 @@ jobs:
- name: Driver Tests
test-args: >-
:only-tags [:mb/driver-tests]
exclude-tag: ':mb/transforms-python-test'
- name: Transforms Python Tests
test-args: >-
:only-tags [:mb/transforms-python-test]
needs-python-runner: true
services:
mysql:
@@ -414,7 +511,13 @@ jobs:
name: "${{ matrix.version.name }} ${{ matrix.job.name }}"
steps:
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
uses: ./.github/actions/setup-python-runner
with:
metabase-automation-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: Test ${{ matrix.version.name }}
id: test-driver
uses: ./.github/actions/test-driver
with:
junit-name: ${{ matrix.version.junit-name }}
@@ -432,6 +535,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 }}
- name: Cleanup python-runner
if: always()
uses: ./.github/actions/cleanup-python-runner
with:
upload-logs: ${{ steps.test-driver.outcome == 'failure' }}
logs-artifact-suffix: ${{ matrix.job.name }} ${{ matrix.version.name }}
be-tests-mongo:
needs: determine-driver-skips
@@ -448,6 +557,15 @@ jobs:
- name: MongoDB Latest
junit-name: be-tests-mongo-latest-ee
image: mongo:latest
job:
- name: Driver Tests
test-args: >-
:exclude-tags '[:mongo-sharded-cluster-tests :mb/transforms-python-test]'
:only-tags [:mb/driver-tests]
- name: Transforms Python Tests
test-args: >-
:only-tags [:mb/transforms-python-test]
needs-python-runner: true
env:
CI: 'true'
DRIVERS: mongo
@@ -461,16 +579,20 @@ jobs:
env:
MONGO_INITDB_ROOT_USERNAME: metabase
MONGO_INITDB_ROOT_PASSWORD: metasample123
name: ${{ matrix.version.name }}
name: ${{ matrix.version.name }} ${{ matrix.job.name }}
steps:
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
uses: ./.github/actions/setup-python-runner
with:
metabase-automation-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: Test ${{ matrix.version.name }}
id: test-driver
uses: ./.github/actions/test-driver
with:
junit-name: ${{ matrix.version.junit-name }}
test-args: >-
:exclude-tags [:mongo-sharded-cluster-tests]
:only-tags [:mb/driver-tests]
test-args: ${{ matrix.job.test-args }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
@@ -482,6 +604,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 }}
- name: Cleanup python-runner
if: ${{ always() && matrix.job.needs-python-runner == true }}
uses: ./.github/actions/cleanup-python-runner
with:
upload-logs: ${{ steps.test-driver.outcome == 'failure' }}
logs-artifact-suffix: ${{ matrix.job.name }} ${{ matrix.version.name }}
be-tests-mongo-ssl:
needs: determine-driver-skips
@@ -534,7 +662,7 @@ jobs:
with:
junit-name: ${{ matrix.version.junit-name }}
test-args: >-
:exclude-tags [:mongo-sharded-cluster-tests]
:exclude-tags '[:mongo-sharded-cluster-tests :mb/transforms-python-test]'
:only-tags [:mb/driver-tests]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
@@ -642,6 +770,7 @@ jobs:
junit-name: ${{ matrix.version.junit-name }}
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()
@@ -676,6 +805,11 @@ jobs:
- name: Driver Tests
test-args: >-
:only-tags [:mb/driver-tests]
exclude-tag: ':mb/transforms-python-test'
- name: Transforms Python Tests
test-args: >-
:only-tags [:mb/transforms-python-test]
needs-python-runner: true
name: "${{ matrix.version.name }} ${{ matrix.job.name }}"
env:
# Only run old migrations tests on pushes to master or release branches. All other branches should skip tests
@@ -717,7 +851,13 @@ jobs:
POSTGRES_HOST_AUTH_METHOD: trust
steps:
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
uses: ./.github/actions/setup-python-runner
with:
metabase-automation-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: Test ${{ matrix.version.name }} (${{ matrix.job.name }})
id: test-driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-${{ matrix.version.junit-name }}'
@@ -735,6 +875,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 }}
- name: Cleanup python-runner
if: always()
uses: ./.github/actions/cleanup-python-runner
with:
upload-logs: ${{ steps.test-driver.outcome == 'failure' }}
logs-artifact-suffix: ${{ matrix.job.name }} ${{ matrix.version.name }}
be-tests-presto-jdbc-ee:
needs: determine-driver-skips
@@ -793,6 +939,7 @@ jobs:
junit-name: 'be-tests-presto-jdbc-ee'
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()
@@ -822,20 +969,33 @@ jobs:
skip: false
test-args: >-
:only-tags [:mb/driver-tests]
:exclude-tags [:mb/upload-tests]
:exclude-tags '[:mb/upload-tests :mb/transforms-python-test]'
:fail-fast? true
- name: Redshift Transforms Python Tests
skip: false
test-args: >-
:only-tags [:mb/transforms-python-test]
:fail-fast? true
needs-python-runner: true
env:
CI: 'true'
DRIVERS: redshift
MB_REDSHIFT_TEST_USER: metabase_ci
MB_REDSHIFT_TEST_DB: testdb
MB_REDSHIFT_TEST_DB_ROUTING: dev
MB_REDSHIFT_TEST_HOST: ${{ secrets.MB_REDSHIFT_TEST_HOST }}
MB_REDSHIFT_TEST_PASSWORD: ${{ secrets.MB_REDSHIFT_TEST_PASSWORD }}
name: ${{ matrix.job.name }}
steps:
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
uses: ./.github/actions/setup-python-runner
with:
metabase-automation-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: Test ${{ matrix.job.name }}
id: test-driver
if: ${{ !matrix.job.skip }}
uses: ./.github/actions/test-driver
with:
@@ -853,45 +1013,82 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
- name: Cleanup python-runner
if: ${{ always() && matrix.job.needs-python-runner == true }}
uses: ./.github/actions/cleanup-python-runner
with:
upload-logs: ${{ steps.test-driver.outcome == 'failure' }}
logs-artifact-suffix: ${{ matrix.job.name }} ${{ matrix.version.name }}
be-tests-snowflake-ee:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: snowflake
MB_SNOWFLAKE_TEST_USER: METABASE CI
MB_SNOWFLAKE_TEST_ACCOUNT: ${{ secrets.MB_SNOWFLAKE_TEST_ACCOUNT }}
MB_SNOWFLAKE_TEST_PASSWORD: ${{ secrets.MB_SNOWFLAKE_TEST_PASSWORD }}
MB_SNOWFLAKE_TEST_WAREHOUSE: ${{ secrets.MB_SNOWFLAKE_TEST_WAREHOUSE }}
MB_SNOWFLAKE_TEST_PK_USER: METABASE PK
MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY: ${{ secrets.MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY }}
# RSA Role testing:
MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_DEFAULT_USER: RSA_ROLE_TEST_DEFAULT_USER
MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_CUSTOM_USER: RSA_ROLE_TEST_CUSTOM_USER
MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_ROLE: RSA_ROLE_TEST_ROLE
MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_DB: RSA_ROLE_TEST_DB
name: Snowflake
steps:
- uses: actions/checkout@v4
- name: Test Snowflake driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-snowflake-ee'
test-args: >-
:only-tags [:mb/driver-tests]
- 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 }}
# dan sutton 2025-10-23: disable snowflake because of account
# issues. https://linear.app/metabase/issue/DEV-997/reenable-snowflake-in-ci. Note that the transforms tests were
# disabled previously
# be-tests-snowflake-ee:
# if: ${{ !inputs.skip }}
# runs-on: ubuntu-22.04
# timeout-minutes: 60
# strategy:
# fail-fast: false
# matrix:
# job:
# - name: Driver Tests
# test-args: >-
# :only-tags [:mb/driver-tests]
# :exclude-tags [:mb/transforms-python-test]
# DS 2025-09-26 temporarily disabled while we diagnose flakes
# - name: Transforms Python Tests
# test-args: >-
# :only-tags [:mb/transforms-python-test]
# needs-python-runner: true
# env:
# CI: 'true'
# DRIVERS: snowflake
# MB_SNOWFLAKE_TEST_USER: METABASE CI
# MB_SNOWFLAKE_TEST_ACCOUNT: ${{ secrets.MB_SNOWFLAKE_TEST_ACCOUNT }}
# MB_SNOWFLAKE_TEST_PASSWORD: ${{ secrets.MB_SNOWFLAKE_TEST_PASSWORD }}
# MB_SNOWFLAKE_TEST_WAREHOUSE: ${{ secrets.MB_SNOWFLAKE_TEST_WAREHOUSE }}
# MB_SNOWFLAKE_TEST_PK_USER: METABASE PK
# MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY: ${{ secrets.MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY }}
# MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY_2: ${{ secrets.MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY_2 }}
# MB_SNOWFLAKE_TEST_PK_PUBLIC_KEY: ${{ secrets.MB_SNOWFLAKE_TEST_PK_PUBLIC_KEY }}
# MB_SNOWFLAKE_TEST_PK_PUBLIC_KEY_2: ${{ secrets.MB_SNOWFLAKE_TEST_PK_PUBLIC_KEY_2 }}
# # RSA Role testing:
# MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_DEFAULT_USER: RSA_ROLE_TEST_DEFAULT_USER
# MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_CUSTOM_USER: RSA_ROLE_TEST_CUSTOM_USER
# MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_ROLE: RSA_ROLE_TEST_ROLE
# MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_DB: RSA_ROLE_TEST_DB
# name: Snowflake ${{ matrix.job.name }}
# steps:
# - uses: actions/checkout@v4
# - name: Setup python-runner
# if: ${{ matrix.job.needs-python-runner == true }}
# uses: ./.github/actions/setup-python-runner
# with:
# metabase-automation-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
# - name: Test Snowflake driver
# id: test-driver
# uses: ./.github/actions/test-driver
# with:
# junit-name: 'be-tests-snowflake-ee'
# test-args: ${{ matrix.job.test-args }}
# - 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 }}
# - name: Cleanup python-runner
# if: ${{ always() && matrix.job.needs-python-runner == true }}
# uses: ./.github/actions/cleanup-python-runner
# with:
# upload-logs: ${{ steps.test-driver.outcome == 'failure' }}
# logs-artifact-suffix: ${{ matrix.job.name }} ${{ matrix.version.name }}
be-tests-sparksql-ee:
needs: determine-driver-skips
@@ -915,6 +1112,7 @@ jobs:
junit-name: 'be-tests-sparksql-ee'
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()
@@ -944,6 +1142,7 @@ jobs:
junit-name: 'be-tests-sqlite-ee'
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()
@@ -971,6 +1170,15 @@ jobs:
- name: SQL Server 2022
junit-name: be-tests-sqlserver-2022-ee
image: mcr.microsoft.com/mssql/server:2022-latest
job:
- name: Driver Tests
test-args: >-
:only-tags [:mb/driver-tests]
:exclude-tags [:mb/transforms-python-test]
- name: Transforms Python Tests
test-args: >-
:only-tags [:mb/transforms-python-test]
needs-python-runner: true
env:
CI: 'true'
DRIVERS: sqlserver
@@ -986,15 +1194,20 @@ jobs:
ACCEPT_EULA: Y
SA_PASSWORD: 'P@ssw0rd'
MSSQL_MEMORY_LIMIT_MB: 1024
name: ${{ matrix.version.name }}
name: ${{ matrix.version.name }} ${{ matrix.job.name }}
steps:
- uses: actions/checkout@v4
- name: Setup python-runner
if: ${{ matrix.job.needs-python-runner == true }}
uses: ./.github/actions/setup-python-runner
with:
metabase-automation-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: Test ${{ matrix.version.name }}
id: test-driver
uses: ./.github/actions/test-driver
with:
junit-name: ${{ matrix.version.junit-name }}
test-args: >-
:only-tags [:mb/driver-tests]
test-args: ${{ matrix.job.test-args }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
@@ -1006,47 +1219,84 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
- name: Cleanup python-runner
if: ${{ always() && matrix.job.needs-python-runner == true }}
uses: ./.github/actions/cleanup-python-runner
with:
upload-logs: ${{ steps.test-driver.outcome == 'failure' }}
logs-artifact-suffix: ${{ matrix.job.name }} ${{ matrix.version.name }}
be-tests-starburst-ee:
# TODO(dpsutton, 2025-08-20): Re-enable starburst when we figure out why it randomly dies in CI
# be-tests-starburst-ee:
# needs: determine-driver-skips
# if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
# runs-on: ubuntu-22.04
# timeout-minutes: 60
# env:
# CI: 'true'
# DRIVERS: starburst
# services:
# starburst:
# image: trinodb/trino:latest
# env:
# CATALOG_MANAGEMENT: dynamic
# ports:
# - "8080:8080"
# name: Starburst
# steps:
# - uses: actions/checkout@v4
# - name: Make plugins directory
# run: mkdir plugins
# - name: Test Starburst driver
# uses: ./.github/actions/test-driver
# with:
# junit-name: 'be-tests-starburst-ee'
# test-args: >-
# :only-tags [:mb/driver-tests]
# - 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 }}
login-to-ecr:
needs: determine-driver-skips
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
env:
CI: 'true'
DRIVERS: starburst
services:
starburst:
image: trinodb/trino:latest
env:
CATALOG_MANAGEMENT: dynamic
ports:
- "8080:8080"
name: Starburst
timeout-minutes: 15
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v4
- name: Make plugins directory
run: mkdir plugins
- name: Test Starburst driver
uses: ./.github/actions/test-driver
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
junit-name: 'be-tests-starburst-ee'
test-args: >-
:only-tags [:mb/driver-tests]
- 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 }}
role-to-assume: ${{ secrets.CI_IAM_ROLE }}
role-session-name: GitHub_to_AWS_via_FederatedOIDC
aws-region: us-east-1
- name: Get ECR password
id: login-ecr
run: |
PASSWORD=$(aws ecr get-login-password --region us-east-1)
REGISTRY="$(aws sts get-caller-identity --query Account --output text).dkr.ecr.us-east-1.amazonaws.com"
echo "docker_username=AWS" >> $GITHUB_OUTPUT
echo "docker_password=$PASSWORD" >> $GITHUB_OUTPUT
echo "registry=$REGISTRY" >> $GITHUB_OUTPUT
outputs:
registry: ${{ steps.login-ecr.outputs.registry }}
docker_username: ${{ steps.login-ecr.outputs.docker_username }}
docker_password: ${{ steps.login-ecr.outputs.docker_password }}
be-tests-vertica-ee:
needs: determine-driver-skips
needs: [determine-driver-skips, login-to-ecr]
if: ${{ !inputs.skip && !(needs.determine-driver-skips.outputs.skip == 'true') }}
runs-on: ubuntu-22.04
timeout-minutes: 60
@@ -1055,9 +1305,12 @@ jobs:
DRIVERS: vertica
services:
vertica:
image: vertica/vertica-ce:12.0.2-0
image: ${{ needs.login-to-ecr.outputs.registry }}/vertica-ce:25.3.0-0
ports:
- "5433:5433"
credentials:
username: ${{ needs.login-to-ecr.outputs.docker_username }}
password: ${{ needs.login-to-ecr.outputs.docker_password }}
name: Vertica
steps:
- uses: actions/checkout@v4
@@ -1069,6 +1322,7 @@ jobs:
junit-name: 'be-tests-vertica-ee'
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()
@@ -1098,12 +1352,14 @@ jobs:
- be-tests-postgres
- be-tests-presto-jdbc-ee
- be-tests-redshift-ee
- be-tests-snowflake-ee
# dan: disabled for account reasons. https://linear.app/metabase/issue/DEV-997/reenable-snowflake-in-ci
# - be-tests-snowflake-ee
- be-tests-sparksql-ee
- be-tests-sqlite-ee
- be-tests-sqlserver
- be-tests-starburst-ee
- be-tests-vertica-ee
# - be-tests-starburst-ee
# TODO(rileythomp, 2025-08-20): Re-enable vertica tests once the docker image is updated
# - be-tests-vertica-ee
- be-tests-clickhouse-ee
runs-on: ubuntu-latest
timeout-minutes: 5
@@ -1125,7 +1381,7 @@ jobs:
}));
// are all jobs skipped or successful?
if (jobs.every(job => (job.result === 'skipped' || job.result === 'success'))) {
if (jobs.every(job => (job.result === 'skipped' || job.result === 'success' || job.name == 'be-tests-starburst-ee'))) {
console.log("");
console.log(" _------. ");
console.log(" / , \_ ");

View File

@@ -0,0 +1,184 @@
# Thi workflow does the backward compatibility tests
# between the Embedding SDK package of version N and Embedding SDK Bundle of version N - 1
# N - 1 is a target of a PR
name: Embedding SDK backward-compatibility E2E Component Tests
on:
workflow_call:
inputs:
cached-embedding-sdk-dist-artifact-name:
required: true
type: string
jobs:
files-changed:
name: "SDK backward-compatibility E2E > Check which files changed"
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
e2e_embedding_sdk: ${{ steps.changes.outputs.e2e_embedding_sdk }}
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
decide-target-ref:
runs-on: ubuntu-latest
outputs:
target-ref: ${{ steps.get-target-ref.outputs.value }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Decide ref to checkout
id: get-target-ref
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "value=${{ github.base_ref }}" >> "$GITHUB_OUTPUT"
else
echo "value=$(git rev-parse HEAD^1)" >> "$GITHUB_OUTPUT"
fi
# if this is a test on a release branch, we need to check the build requirements
get-build-requirements:
name: "SDK backward-compatibility E2E > [Backport only] Get build requirements"
needs: [decide-target-ref]
if: |
!cancelled() &&
contains(github.base_ref || github.ref, 'release-x')
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
java_version: ${{ fromJson(steps.dependencies.outputs.result).java_version }}
node_version: ${{ fromJson(steps.dependencies.outputs.result).node_version }}
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.decide-target-ref.outputs.target-ref }}
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get build dependencies
uses: actions/github-script@v7
id: dependencies
with:
script: | # js
const {
getBuildRequirements,
getVersionFromReleaseBranch,
} = require('${{ github.workspace }}/release/dist/index.cjs');
const targetBranchName = '${{ github.base_ref || github.ref }}';
const version = getVersionFromReleaseBranch(targetBranchName);
const requirements = getBuildRequirements(version);
return {
java_version: requirements.java,
node_version: requirements.node,
};
e2e-tests:
name: "SDK backward-compatibility E2E > Run e2e tests"
needs: [files-changed, decide-target-ref, get-build-requirements]
if: |
!cancelled() &&
needs.files-changed.outputs.e2e_embedding_sdk == 'true'
runs-on: ubuntu-22.04
timeout-minutes: 45
env:
MB_EDITION: ee
DISPLAY: ""
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
steps:
- uses: actions/checkout@v4
with:
ref: ${{ needs.decide-target-ref.outputs.target-ref }}
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
java-version: "${{ needs.get-build-requirements.outputs.java_version || 21 }}"
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
with:
node-version: "${{ needs.get-build-requirements.outputs.node_version }}"
- name: Build uberjar with ./bin/build.sh
run: ./bin/build.sh
- name: Retrieve Embedding SDK dist artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.cached-embedding-sdk-dist-artifact-name }}
path: ${{ github.workspace }}/resources/embedding-sdk
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Run Metabase
run: node e2e/runner/run_cypress_ci.js start
- name: Make app db snapshot
run: node e2e/runner/run_cypress_ci.js snapshot --browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Run component tests for Embedding SDK
run: |
node e2e/runner/run_cypress_ci.js component \
--browser ${{ steps.cypress-prep.outputs.chrome-path }} \
--env grepTags="-@skip-backward-compatibility",grepOmitFiltered=true
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit
output-name: e2e-embedding-sdk
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 }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-recording-embedding-sdk-cross-version
path: |
./cypress
./logs/test.log
if-no-files-found: ignore
- name: Publish Summary
if: failure()
uses: actions/github-script@v7
with:
script: | #js
const {
generateReport,
parseReport,
formatSummary
} = require("./.github/scripts/handle-mochawesome-report.js");
const report = await generateReport();
const results = parseReport(report);
const summary = formatSummary(results);
await core.summary.addRaw(summary).write();

View File

@@ -1,230 +0,0 @@
name: E2E Cross-version Component Tests for Embedding SDK
on:
workflow_call:
jobs:
files-changed:
name: "SDK cross-version E2E > Check which files changed"
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
e2e_all: ${{ steps.changes.outputs.e2e_all }}
steps:
- uses: actions/checkout@v4
- name: Test which files changed
uses: dorny/paths-filter@v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-paths.yaml
# if this is a test on a release branch, we need to check the build requirements
get-build-requirements:
name: "SDK cross-version E2E > [Backport only] Get build requirements"
if: |
!cancelled()
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
java_version: ${{ fromJson(steps.dependencies.outputs.result).java_version }}
node_version: ${{ fromJson(steps.dependencies.outputs.result).node_version }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get build dependencies
uses: actions/github-script@v7
id: dependencies
with:
script: | # js
const {
getBuildRequirements,
getVersionFromReleaseBranch,
} = require('${{ github.workspace }}/release/dist/index.cjs');
const targetBranchName = '${{ github.base_ref || github.ref }}';
const version = getVersionFromReleaseBranch(targetBranchName);
const requirements = getBuildRequirements(version);
return {
java_version: requirements.java,
node_version: requirements.node,
};
build:
name: "SDK cross-version E2E > Build uberjar"
needs: [files-changed, get-build-requirements]
if: |
!cancelled()
runs-on: ubuntu-22.04
timeout-minutes: 25
env:
MB_EDITION: ee
INTERACTIVE: false
# make sure that builds on release branches get licenses, because we use them for releases
SKIP_LICENSES: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
with:
node-version: "${{ needs.get-build-requirements.outputs.node_version }}"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: uberjar
java-version: "${{ needs.get-build-requirements.outputs.java_version || 11 }}"
- name: Build uberjar with ./bin/build.sh
run: ./bin/build.sh
- name: Prepare uberjar artifact
uses: ./.github/actions/prepare-uberjar-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar-cross-version
resolve-sdk-version:
name: "SDK cross-version E2E > Resolve SDK version"
if: |
!cancelled()
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
sdk_version: ${{ fromJson(steps.dependencies.outputs.result).sdk_version }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get latest SDK release for this branch
uses: actions/github-script@v7
id: dependencies
with:
script: | # js
const { getSdkVersionFromReleaseBranchName } = require('${{ github.workspace }}/release/dist/index.cjs');
const branchName = '${{ github.base_ref || github.ref }}';
const sdk_version = await getSdkVersionFromReleaseBranchName({
github,
owner: context.repo.owner,
repo: context.repo.repo,
branchName,
});
return {
sdk_version,
};
e2e-tests:
name: "SDK cross-version E2E > Run e2e tests"
needs: [get-build-requirements, build, resolve-sdk-version]
if: |
!cancelled() && needs.build.result == 'success'
runs-on: ubuntu-22.04
timeout-minutes: 45
env:
MB_EDITION: ee
DISPLAY: ""
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
steps:
- uses: actions/checkout@v4
# Needed to omit newly added tests for functionality that is not yet released
- name: Sparse checkout tests from SDK release commit
uses: actions/checkout@v4
with:
ref: embedding-sdk-${{ needs.resolve-sdk-version.outputs.sdk_version }}
path: sdk-release-e2e
sparse-checkout: e2e
- name: Move tests from the release commit into the repo
run: |
rm -rf ./e2e/support/*
mv ./sdk-release-e2e/e2e/support/* ./e2e/support
rm -rf ./e2e/test-component/*
mv ./sdk-release-e2e/e2e/test-component/* ./e2e/test-component
shell: bash
- name: Retrieve uberjar artifact for ee
uses: actions/download-artifact@v4
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar-cross-version
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare JDK ${{ needs.get-build-requirements.outputs.java_version || 11 }}
uses: actions/setup-java@v4
with:
java-version: ${{ needs.get-build-requirements.outputs.java_version || 11 }}
distribution: "temurin"
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Install Embedding SDK package v${{ needs.resolve-sdk-version.outputs.sdk_version }}
run: yarn add @metabase/embedding-sdk-react@${{ needs.resolve-sdk-version.outputs.sdk_version }}
- name: Run Metabase
run: node e2e/runner/run_cypress_ci.js start
- name: Make app db snapshot
run: node e2e/runner/run_cypress_ci.js snapshot --browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Run component tests for Embedding SDK
run: node e2e/runner/run_cypress_ci.js component --browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit
output-name: e2e-embedding-sdk
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 }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-recording-embedding-sdk-cross-version
path: |
./cypress
./logs/test.log
if-no-files-found: ignore
- name: Publish Summary
if: failure()
uses: actions/github-script@v7
with:
script: | #js
const {
generateReport,
parseReport,
formatSummary
} = require("./.github/scripts/handle-mochawesome-report.js");
const report = await generateReport();
const results = parseReport(report);
const summary = formatSummary(results);
await core.summary.addRaw(summary).write();

View File

@@ -83,7 +83,6 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: uberjar
java-version: "${{ needs.get-build-requirements.outputs.java_version || 21 }}"
- name: Build uberjar with ./bin/build.sh
@@ -116,7 +115,7 @@ jobs:
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
CYPRESS_IS_EMBEDDING_SDK: true
CYPRESS_IS_EMBEDDING_SDK: "true"
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
@@ -144,8 +143,6 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Retrieve Embedding SDK dist artifact
uses: actions/download-artifact@v4

View File

@@ -1,162 +0,0 @@
name: E2E cross-version for breaking changes
# See `bin/backward-compatibility-test.js` for the documentation of this workflow.
on:
workflow_dispatch:
inputs:
fe-ref:
description: "Frontend git ref to use"
type: string
required: true
default: "master"
be-ref:
description: "Backend git ref to use"
type: string
required: true
default: "master"
total-shards:
description: "Total number of parallel test shards"
type: number
required: false
default: 4
workflow_call:
inputs:
fe-ref:
description: "Frontend git ref to use"
type: string
required: true
be-ref:
description: "Backend git ref to use"
type: string
required: true
total-shards:
description: "Total number of parallel test shards"
type: number
required: false
default: 4
jobs:
generate-matrix:
name: "Breaking changes E2E > Generate matrix"
runs-on: ubuntu-latest
outputs:
matrix_json: ${{ steps.set_matrix.outputs.matrix_json }}
shards_total: ${{ steps.set_matrix.outputs.shards_total }}
steps:
- name: Set up shard matrix
id: set_matrix
uses: actions/github-script@v7
with:
# generate an output like `{"matrixJson": "{\"shard\": [1, 2, 3, 4]}", "shardsTotal": 4}` to be used in the other jobs
script: |
const totalShards = parseInt(process.env.TOTAL_SHARDS_INPUT, 10);
const matrix = { shard: Array.from({ length: totalShards }, (_, i) => i + 1) };
console.log("Generated matrix JSON", matrix);
console.log(`Total shards: ${totalShards}`);
core.setOutput('matrix_json', JSON.stringify(matrix));
core.setOutput('shards_total', totalShards);
env:
TOTAL_SHARDS_INPUT: ${{ inputs.total-shards }}
build-jar:
name: "Breaking changes E2E > Build jar"
runs-on: ubuntu-22.04
timeout-minutes: 45
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare Node.js
# We're not using `actions/prepare-frontend` because we don't want to install deps from the root repo
# nor we want to touch the cache as we'll be potentially be installing different versions of packages
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: cross-version-uberjar
- name: Build jar with different frontend and backend version
env:
MB_EDITION: ee
CYPRESS_CI: true
run: |
node bin/backward-compatibility-test.js \
${{ inputs.fe-ref }} ${{ inputs.be-ref }} \
build
- name: Upload Uberjar
uses: actions/upload-artifact@v4
with:
name: metabase-jar-cross-version
path: .tmp/metabase-be/target/uberjar/metabase.jar
if-no-files-found: error
run-breaking-changes-tests:
name: "Breaking changes E2E > Run breaking changes tests"
needs: [build-jar, generate-matrix]
runs-on: ubuntu-22.04
timeout-minutes: 45
env:
TOTAL_SHARDS: ${{ needs.generate-matrix.outputs.shards_total }}
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.generate-matrix.outputs.matrix_json) }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: cross-version-uberjar
- name: Download Uberjar
uses: actions/download-artifact@v4
with:
name: metabase-jar-cross-version
path: .tmp/metabase-be/target/uberjar/
- name: Download FE repo
run: |
git clone --depth 1 -b ${{ inputs.fe-ref }} https://github.com/metabase/metabase.git .tmp/metabase-fe
- name: Install FE dependencies
working-directory: .tmp/metabase-fe
run: |
yarn install
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
with:
working-directory: .tmp/metabase-fe
- name: Run the tests
env:
MB_EDITION: ee
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_MB_STARTER_CLOUD_TOKEN: ${{ secrets.MB_STARTER_CLOUD_TOKEN }}
CYPRESS_MB_PRO_CLOUD_TOKEN: ${{ secrets.MB_PRO_CLOUD_TOKEN }}
CYPRESS_MB_PRO_SELF_HOSTED_TOKEN: ${{ secrets.MB_PRO_SELF_HOSTED_TOKEN }}
CYPRESS_CI: true
run: |
node bin/backward-compatibility-test.js \
${{ inputs.fe-ref }} ${{ inputs.be-ref }} \
start > /dev/null & \
node bin/backward-compatibility-test.js \
${{ inputs.fe-ref }} ${{ inputs.be-ref }} \
test ${{ matrix.shard}}/${{ env.TOTAL_SHARDS }}

View File

@@ -167,7 +167,6 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: uberjar
java-version: "${{ needs.get-build-requirements.outputs.java_version || 21 }}"
- name: Build uberjar with ./bin/build.sh
@@ -178,12 +177,12 @@ jobs:
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
- name: Compile CLJS
run: yarn build-pure:cljs
shell: bash
- name: Build Embedding SDK package
run: yarn build-embedding-sdk
run: |
# 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
- name: Prepare Embedding SDK artifact
uses: actions/upload-artifact@v4
@@ -196,7 +195,7 @@ jobs:
# - starts it
# - runs its Cypress tests against the local metabase.jar and local @metabase/embedding-sdk-react package.
# The job is not required, though if it's failing better to be sure that it's not caused by a breaking change.
# For more details see `Sample Apps compatibility with Embedding SDK tests` in `enterprise/frontend/src/embedding-sdk/dev.md`
# For more details see `Sample Apps compatibility with Embedding SDK tests` in `enterprise/frontend/src/embedding-sdk-package/dev.md`
e2e-sample-apps-tests:
needs: [get-build-requirements, get-sample-apps-data, build]
strategy:
@@ -215,7 +214,7 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_IS_EMBEDDING_SDK: true
CYPRESS_IS_EMBEDDING_SDK: "true"
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
SAMPLE_APP_BRANCH_NAME: ${{ needs.get-sample-apps-data.outputs.branch_name }}
@@ -320,18 +319,19 @@ jobs:
# - starts an app
# - runs its Cypress tests against the e2e test metabase instance and local @metabase/embedding-sdk-react package.
# The job is not required, though if it's failing better to be sure that it's not caused by a breaking change.
# For more details see `Embedding SDK integration tests with Host Apps` in `enterprise/frontend/src/embedding-sdk/dev.md`
# For more details see `Embedding SDK integration tests with Host Apps` in `enterprise/frontend/src/embedding-sdk-package/dev.md`
e2e-host-apps-tests:
needs: [get-build-requirements, build]
strategy:
matrix:
test_suite: [
"vite-6-host-app-e2e",
"next-15-app-router-host-app-e2e",
"next-15-pages-router-host-app-e2e",
"angular-20-host-app-e2e",
]
environment: [ "production", "development" ]
test_suite:
[
"vite-6-host-app-e2e",
"next-15-app-router-host-app-e2e",
"next-15-pages-router-host-app-e2e",
"angular-20-host-app-e2e",
]
environment: ["production", "development"]
if: |
!cancelled() && needs.build.result == 'success'
runs-on: ubuntu-22.04
@@ -344,7 +344,7 @@ jobs:
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
CYPRESS_MB_ALL_FEATURES_TOKEN: ${{ secrets.MB_ALL_FEATURES_TOKEN }}
CYPRESS_IS_EMBEDDING_SDK: true
CYPRESS_IS_EMBEDDING_SDK: "true"
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
HOST_APP_ENVIRONMENT: ${{ matrix.environment }}

View File

@@ -57,9 +57,18 @@ jobs:
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
CYPRESS_QA_DB_MONGO: ${{ inputs.name == 'mongo' }}
CYPRESS_IS_EMBEDDING_SDK: ${{ inputs.name == 'embedding-sdk' }}
CYPRESS_IS_EMBEDDING_SDK: "${{ inputs.name == 'embedding-sdk' }}"
steps:
- uses: actions/checkout@v4
with:
submodules: true
token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: Setup python-runner
if: ${{ inputs.name == 'python' }}
env:
METABASE_AUTOMATION_USER_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
run: ./.github/scripts/setup-python-runner.sh
- name: Prepare Docker containers
uses: ./.github/actions/e2e-prepare-containers
@@ -79,9 +88,11 @@ jobs:
uses: ./.github/actions/run-embedding-sdk-storybook
- name: Retrieve uberjar artifact for ${{ inputs.edition }}
uses: actions/download-artifact@v4
uses: ./.github/actions/fetch-artifact
with:
name: metabase-${{ inputs.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
extract-path: "target/uberjar"
output-name: "metabase.jar"
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
@@ -121,7 +132,7 @@ jobs:
SPLIT_INDEX: ${{ inputs.split_index }}
SPLIT_FILE: "./e2e/support/timings.json"
SPLIT_OUTPUT_FILE: "newTimes.json"
SPLIT_TIME_THRESHOLD: 5.0
SPLIT_TIME_THRESHOLD: 0.01 # 1% threshold for changes
# do not write cypress-split summary to github
SPLIT_SUMMARY: false
SPEC_PATH: ${{ env.specs || inputs.specs }}
@@ -129,9 +140,14 @@ jobs:
run: |
echo "Running tests with specs: $SPEC_PATH"
node e2e/runner/run_cypress_ci.js e2e \
--env grepTags="-@mongo+-@flaky+-@OSS --@quarantine",grepOmitFiltered=true \
--env grepTags="-@mongo+-@python+-@flaky+-@OSS+-@skip",grepOmitFiltered=true \
--spec "$SPEC_PATH" \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
# 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.
# We only want to "continue on error" (ignore failures) when the Trunk upload is active - i.e. not on drafts!
continue-on-error: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.draft == true) }}
- name: Run Tagged EE Cypress tests on ${{ inputs.name }}
if: ${{ inputs.specs }}
@@ -141,21 +157,28 @@ jobs:
run: |
echo "Running tests with specs: $SPEC_PATH"
node e2e/runner/run_cypress_ci.js e2e \
--env grepTags="${{inputs.tags}} --@quarantine",grepOmitFiltered=true \
--env grepTags="${{inputs.tags && format('{0}+-@skip', inputs.tags) || '-@skip'}}",grepOmitFiltered=true \
--spec "$SPEC_PATH" \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
# 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.
# We only want to "continue on error" (ignore failures) when the Trunk upload is active - i.e. not on drafts!
continue-on-error: ${{ !(github.event_name == 'pull_request' && github.event.pull_request.draft == true) }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit
# Related to our custom upload to S3
output-name: e2e-${{ inputs.name }}
variant: e2e-tests
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 }}
# Related to Trunk uploader
variant: e2e-tests
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
- name: Upload Cypress Artifacts upon failure
@@ -175,6 +198,51 @@ jobs:
name: failed-tests-${{ inputs.name }}-${{ inputs.edition }}
path: ./cypress/test-results
- name: Extract chunk-specific changed timings
id: extract-timings
if: inputs.split_index >= 0 && github.ref == 'refs/heads/master'
continue-on-error: true
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const oldTimingsPath = "./e2e/support/timings.json";
const newTimingsPath = "./e2e/support/newTimes.json";
if (!fs.existsSync(newTimingsPath)) {
throw new Error(`newTimes.json not found - cypress-split may not have generated it`);
}
if (!fs.existsSync(oldTimingsPath)) {
throw new Error(`Original timings file ${oldTimingsPath} not found`);
}
const oldTimings = fs.existsSync(oldTimingsPath)
? JSON.parse(fs.readFileSync(oldTimingsPath, "utf8"))
: { durations: [] };
const newTimings = fs.existsSync(newTimingsPath)
? JSON.parse(fs.readFileSync(newTimingsPath, "utf8"))
: { durations: [] };
const { extractChangedTimings } = require('${{ github.workspace }}/.github/scripts/extract-changed-timings.js');
const result = extractChangedTimings({ oldTimings, newTimings });
if (result.hasChanges) {
core.setOutput('has-changes', 'true');
fs.writeFileSync('chunkTimings.json', JSON.stringify(result.changedTimings, null, 2));
console.log(`Extracted ${Object.keys(result.changedTimings).length} changed timings for chunk index ${{ inputs.split_index }}`);
}
- name: Upload Timing Data
uses: actions/upload-artifact@v4
if: steps.extract-timings.outcome == 'success' && steps.extract-timings.outputs.has-changes == 'true'
with:
name: timing-data-${{ inputs.name }}-${{ inputs.split_index }}
path: chunkTimings.json
retention-days: 1 # gets merged immediately by parent workflow
- name: Publish Summary
if: failure()
uses: actions/github-script@v7

View File

@@ -22,72 +22,6 @@ jobs:
chunks: 50
specs: ${{ inputs.specs }}
# if this is a test on a release branch, we need to check the build requirements
get-build-requirements:
if: |
!cancelled() &&
contains(github.ref, 'release-x')
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
java_version: ${{ fromJson(steps.dependencies.outputs.result).java_version }}
node_version: ${{ fromJson(steps.dependencies.outputs.result).node_version }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get build dependencies
uses: actions/github-script@v7
id: dependencies
with:
script: | # js
const { getBuildRequirements, getVersionFromReleaseBranch } = require('${{ github.workspace }}/release/dist/index.cjs');
const version = getVersionFromReleaseBranch('${{ github.ref }}');
const requirements = getBuildRequirements(version);
return {
java_version: requirements.java,
node_version: requirements.node,
};
build:
needs: [get-build-requirements]
if: ${{ !cancelled() && !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:
matrix:
edition: [oss, ee]
env:
MB_EDITION: ${{ matrix.edition }}
INTERACTIVE: false
# make sure that builds on release branches get licenses, because we use them for releases
SKIP_LICENSES: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
with:
node-version: "${{ needs.get-build-requirements.outputs.node_version }}"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: uberjar
java-version: "${{ needs.get-build-requirements.outputs.java_version || 21 }}"
- name: Build uberjar with ./bin/build.sh
timeout-minutes: 10
run: ./bin/build.sh
shell: bash
- name: Prepare uberjar artifact
uses: ./.github/actions/prepare-uberjar-artifact
with:
name: metabase-${{ matrix.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
reset-e2e-test-comment:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
@@ -124,9 +58,8 @@ jobs:
uses: ./.github/workflows/e2e-test.yml
needs:
- e2e-matrix-builder
- build
if: |
!cancelled() && needs.build.result == 'success'
!cancelled() && !inputs.skip
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.e2e-matrix-builder.outputs.matrix) }}
@@ -145,16 +78,77 @@ jobs:
name: Flaky e2e Tests
uses: ./.github/workflows/e2e-test.yml
needs:
- build
- e2e-matrix-builder
# skip flaky test run if only e2e specs changed as an optimization
if: |
!cancelled() && needs.build.result == 'success' && needs.e2e-matrix-builder.outputs.isDefaultSpecPattern == 'true'
!cancelled() && !inputs.skip && needs.e2e-matrix-builder.outputs.isDefaultSpecPattern == 'true'
secrets: inherit
with:
name: Flaky
tags: "@flaky"
collect-timings:
name: Collect E2E Timings
runs-on: ubuntu-22.04
timeout-minutes: 10
needs: e2e-tests
if: always() && !cancelled() && github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: |
.github
e2e/support
sparse-checkout-cone-mode: false
- name: Download all timing artifacts
uses: actions/download-artifact@v4
with:
pattern: timing-data-*
path: timing-files
merge-multiple: false
continue-on-error: true
- name: Merge split timings
id: merge
continue-on-error: true
uses: actions/github-script@v7
with:
script: |
const fs = require('fs');
const path = require('path');
const globber = await glob.create('timing-files/*/chunkTimings.json');
const chunkFiles = await globber.glob();
const specs = new Map();
chunkFiles.forEach(file => {
const { durations = [] } = JSON.parse(fs.readFileSync(file, 'utf8'));
durations.forEach(({ spec, duration }) => specs.set(spec, duration));
});
if (specs.size === 0) {
throw new Error('No timing data found - no specs had timing changes');
}
const outputPath = 'e2e/support/runTimings.json';
fs.mkdirSync(path.dirname(outputPath), { recursive: true });
const runTimings = {
durations: [...specs].map(([spec, duration]) => ({ spec, duration }))
};
fs.writeFileSync(outputPath, JSON.stringify(runTimings, null, 2));
console.log(`Merged timing data for ${specs.size} specs`);
- name: Upload merged timing files
if: steps.merge.outcome == 'success'
uses: actions/upload-artifact@v4
with:
name: merged-e2e-timings
path: e2e/support/runTimings.json
retention-days: 7
e2e-tests-result:
needs:
- e2e-tests
@@ -181,11 +175,3 @@ jobs:
echo "E2E Tests failed"
exit 1
fi
pr-env:
needs: [build]
if: |
!cancelled() &&
contains(github.event.pull_request.labels.*.name, 'PR-Env')
uses: ./.github/workflows/pr-env.yml
secrets: inherit

View File

@@ -0,0 +1,49 @@
name: Embedding SDK Labels Reminder
on:
pull_request:
types: [auto_merge_enabled, review_requested, labeled, unlabeled, synchronize]
branches:
- "master"
merge_group:
jobs:
files-changed:
name: Check which files changed
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
frontend_embedding_sdk_package_sources: ${{ steps.changes.outputs.frontend_embedding_sdk_package_sources }}
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
embedding-sdk-package-no-release-notes-reminder:
needs: [ files-changed ]
if: |
!cancelled() &&
(needs.files-changed.outputs.frontend_embedding_sdk_package_sources == 'true')
name: Embedding SDK package release-notes/no-release-notes label reminder
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
- uses: jesusvasquez333/verify-pr-label-action@v1.4.0
id: verify-release-notes-labels
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
valid-labels: 'release-notes, no-release-notes'
disable-reviews: true
- name: Comment on PR if label should be added
if: ${{ always() }}
uses: ./.github/actions/notify-pull-request
with:
remove-previous-comment: true
add-new-comment: ${{ steps.verify-release-notes-labels.outcome == 'failure' }}
message: "⚠️ Changes were made to the <b>Embedding SDK Package</b>. Review this PR and apply one of the following labels.<br><br>- <code>release-notes</code> — select if this PR must be included in the main Metabase changelog release notes.<br>- <code>no-release-notes</code> — select if this PR should not be included in the main Metabase changelog release notes."
include-log: true

View File

@@ -40,10 +40,12 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Build Embedding SDK package
run: yarn build-embedding-sdk
run: |
# 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
- name: Prepare Embedding SDK artifact
uses: actions/upload-artifact@v4
with:
@@ -137,7 +139,7 @@ jobs:
if: ${{ steps.docs-generation.outcome == 'failure' }}
run: exit 1
# See `Component e2e tests` in `enterprise/frontend/src/embedding-sdk/dev.md`
# See `Component e2e tests` in `enterprise/frontend/src/embedding-sdk-package/dev.md`
sdk-e2e-tests:
name: "SDK e2e tests"
uses: ./.github/workflows/e2e-component-tests-embedding-sdk.yml
@@ -146,24 +148,13 @@ jobs:
with:
cached-embedding-sdk-dist-artifact-name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
e2e-component-tests-embedding-sdk-cross-version:
name: "[Backport only] SDK e2e cross version tests"
# run on: every push on release branches, and every pr that targets a release branch
if: ${{ startsWith(github.ref, 'refs/heads/release-x.') || (github.event_name == 'pull_request' && startsWith(github.base_ref, 'release-x.')) }}
uses: ./.github/workflows/e2e-component-tests-embedding-sdk-cross-version.yml
e2e-component-tests-embedding-sdk-backward-compatibility:
name: "SDK e2e backward compatibility tests"
uses: ./.github/workflows/e2e-component-tests-embedding-sdk-backward-compatibility.yml
needs: [build]
secrets: inherit
# Temporarily skipped because the cypress runner crashes
# See `bin/backward-compatibility-test.js` for the documentation of this workflow.
# cross-version-for-breaking-changes:
# name: "[NOT REQUIRED - Experimental - Backport only] detect breaking changes with cross versions tests"
# # run on: every pr that targets a release branch, it does NOT run for pr targeting master
# if: ${{ github.event_name == 'pull_request' && startsWith(github.base_ref, 'release-x.') }}
# uses: ./.github/workflows/e2e-cross-version-for-breaking-changes.yml
# secrets: inherit
# with:
# fe-ref: ${{ github.base_ref }}
# be-ref: ${{ github.head_ref }}
with:
cached-embedding-sdk-dist-artifact-name: embedding-sdk-${{ github.event.pull_request.head.sha || github.sha }}
embedding-sdk-tests-result:
needs:
@@ -171,7 +162,7 @@ jobs:
- embedding-sdk-docs-snippets-type-check
- embedding-sdk-api-documentation-generation-validation
- sdk-e2e-tests
- e2e-component-tests-embedding-sdk-cross-version
- e2e-component-tests-embedding-sdk-backward-compatibility
if: always() && !cancelled()
runs-on: ubuntu-latest
timeout-minutes: 5

View File

@@ -43,8 +43,6 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Build cljs
run: yarn build:cljs
- name: Stress-test ${{ github.event.inputs.spec }} ${{ github.event.inputs.burn_in }} times

View File

@@ -9,6 +9,16 @@ on:
skip-lint:
type: boolean
default: false
workflow_dispatch:
inputs:
skip:
description: "Skip main frontend jobs (type-check, unit tests, timezone tests)"
type: boolean
default: false
skip-lint:
description: "Skip linting jobs (prettier, eslint, css variables check)"
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}-frontend
@@ -25,8 +35,6 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Restore ESLint cache
uses: actions/cache@v4
with:
@@ -42,6 +50,8 @@ jobs:
run: yarn run lint-prettier-pure
- name: Run ESLint linter
run: yarn run lint-eslint-pure
- name: Run CSS linter
run: yarn run lint-css
fe-type-check:
if: ${{ !inputs.skip }}
@@ -53,8 +63,6 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- run: yarn build-pure:cljs
name: Compile CLJS
- run: yarn type-check-pure
@@ -63,8 +71,13 @@ jobs:
fe-tests-unit:
if: ${{ !inputs.skip }}
runs-on: ubuntu-22.04
timeout-minutes: 60
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
shard: [1, 2] # 2 shards for parallel execution
env:
SHARDS: 2 # should match matrix above
JEST_JUNIT_OUTPUT_DIR: ./target/junit
JEST_JUNIT_OUTPUT_NAME: test-report-frontend-unit.xml
steps:
@@ -73,24 +86,14 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Run frontend unit tests and collect the code coverage information
if: github.ref_name == 'master'
run: yarn run test-unit --coverage --silent
- name: Run frontend unit tests
if: github.ref_name != 'master'
run: yarn run test-unit --silent
- name: Upload coverage to codecov.io
if: github.ref_name == 'master'
uses: codecov/codecov-action@v4
with:
files: ./coverage/lcov.info
flags: front-end
token: ${{ secrets.CODECOV_TOKEN }}
run: yarn run test-unit --silent --shard=${{ matrix.shard }}/${{ env.SHARDS }}
# We want Trunk to still receive test reports even if this job fails.
# It will filter out the quarantined tests, and will control the job exit code based on the analysis.
continue-on-error: true
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
if: always() && github.event_name != 'workflow_dispatch'
with:
input-path: ./target/junit
output-name: frontend-unit
@@ -110,8 +113,6 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Run frontend timezones tests
run: yarn run test-timezones

View File

@@ -7,10 +7,10 @@ on:
- "master"
- "release-**"
paths:
- "frontend/src/metabase-lib/expressions/**"
- "frontend/src/metabase/querying/expressions/**"
pull_request:
paths:
- "frontend/src/metabase-lib/expressions/**"
- "frontend/src/metabase/querying/expressions/**"
jobs:
fe-fuzz-lexifier:
@@ -22,9 +22,7 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/pratt/fuzz.lexifier.unit.spec.ts
- run: yarn test-unit frontend/src/metabase/querying/expressions/pratt/fuzz.lexifier.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the lexifier
@@ -38,9 +36,7 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/fuzz.compiler.unit.spec.ts
- run: yarn test-unit frontend/src/metabase/querying/expressions/fuzz.compiler.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the custom expression compiler
@@ -54,9 +50,7 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/fuzz.string.unit.spec.ts
- run: yarn test-unit frontend/src/metabase/querying/expressions/fuzz.string.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the custom expression string quoter

View File

@@ -40,8 +40,6 @@ jobs:
ref: ${{ inputs.ref }}
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: generative-query-test
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend

View File

@@ -38,8 +38,6 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: 'i18n'
- name: Install xgettext if necessary
run: |
if ! command -v xgettext > /dev/null; then

View File

@@ -1,32 +0,0 @@
name: Links
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
jobs:
linkChecker:
runs-on: ubuntu-latest
permissions:
issues: write # required for peter-evans/create-issue-from-file
steps:
- uses: actions/checkout@v4
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
fail: false
args: docs --include-fragments --config ./.lychee/config.toml --verbose --no-progress
format: markdown
- name: Create Issue From File
if: steps.lychee.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@v5
with:
title: Link Checker Report
content-filepath: ./.lychee/out.md
labels: "Type:Documentation"
assignees: jeff-bruemmer

View File

@@ -20,32 +20,12 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Compile CLJS
run: yarn build-pure:cljs
- name: Build Storybook
# We won't be able to use Storybook play's `userEvent` with production build
# see https://github.com/storybookjs/storybook/issues/19758
run: NODE_ENV=development yarn build-storybook
- name: Serve Storybook
run: yarn http-server storybook-static -p 6006 &
shell: bash
- name: Wait for Storybook to become available
run: |
echo "Waiting for Storybook to be served..."
while ! curl --silent --fail http://localhost:6006; do
sleep 5
echo "Retrying..."
done
echo "Storybook is being served!"
- name: Update Loki Snapshots
run: yarn test-visual:loki || yarn test-visual:loki-approve-diff && yarn test-visual:loki-prune
run: yarn test-visual:loki:ci || yarn test-visual:loki-approve-diff && yarn test-visual:loki-prune
- name: Check for changes
id: check-changes

View File

@@ -47,20 +47,12 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Compile CLJS
run: NODE_ENV=development yarn build-pure:cljs
- name: Build Storybook
# We won't be able to use Storybook play's `userEvent` with production build
# see https://github.com/storybookjs/storybook/issues/19758
run: NODE_ENV=development yarn build-storybook
- name: Run Loki Visual Tests
run: |
yarn loki --requireReference --reactUri file:./storybook-static --chromeFlags='--headless --disable-gpu' --verboseRenderer
run: yarn test-visual:loki:ci
- name: Generate Visual Report on Failure
if: failure()

View File

@@ -2,7 +2,7 @@ name: Mage Tests
on:
pull_request:
paths: ["mage/**", "test/mage/**"]
paths: ["mage/**"]
jobs:
# run mage tests even if the rest of be isnt needed
@@ -13,8 +13,6 @@ jobs:
- uses: actions/checkout@v4
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: 'kondo'
- name: Setup Babashka
uses: turtlequeue/setup-babashka@v1.7.0
with:
@@ -24,4 +22,4 @@ jobs:
- name: bb task list
run: bb tasks
- name: Run mage tests
run: bb ./test/mage/runtests.clj
run: bb ./mage/test/mage/runtests.clj

View File

@@ -16,7 +16,5 @@ jobs:
- uses: actions/checkout@v4
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: lint-migrations
- name: Verify Liquibase Migrations
run: ./bin/mage lint-migrations

View File

@@ -1,18 +1,19 @@
name: Auto-Optimize Docs PNG Images
on:
push:
paths:
- 'docs/**/*.png'
pull_request:
types:
- labeled
jobs:
optimize-images:
runs-on: ubuntu-latest
if: ${{ contains(github.event.pull_request.labels.*.name,'Type:Documentation') }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install pngcrush and bc
@@ -31,8 +32,8 @@ jobs:
if: steps.changed-files.outputs.any_changed == 'true'
id: optimize
run: |
echo "Optimizing PNG files with pngcrush..."
echo "Branch:" $(git_current_branch)
echo "Optimizing new PNG files with pngcrush..."
echo "Branch: $(git_current_branch)"
# Initialize tracking variables
total_files=0

View File

@@ -9,9 +9,13 @@ concurrency:
cancel-in-progress: true
jobs:
uberjar:
if: ${{ github.event.label.name == 'Run-perf' }}
uses: ./.github/workflows/uberjar.yml
secrets: inherit
run-perf-test:
needs: [uberjar]
if: ${{ github.event.label.name == 'Run-perf' }}
uses: ./.github/workflows/perf-test.yml
with:
wait_for_uberjar: true
secrets: inherit

View File

@@ -3,11 +3,6 @@ run-name: Run perf test for ${{ github.ref_name }} by @${{ github.actor }}
on:
workflow_call:
inputs:
wait_for_uberjar:
description: "Wait for uberjar build"
required: false
type: boolean
jobs:
build:
runs-on: ubuntu-latest
@@ -31,69 +26,12 @@ jobs:
uses: aws-actions/amazon-ecr-login@v2
with:
registries: "${{ secrets.PR_ENV_AWS_ACCOUNT_ID }}"
- name: Wait for uberjar
id: wait_for_uberjar
if: ${{ inputs.wait_for_uberjar == true }}
run: |
## Get workflow run id for uberjar build
curl -Ls --output e2e-tests.json \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/run-tests.yml/runs?head_sha=${{ github.event.pull_request.head.sha || github.sha }}
ID=$(jq -r '.workflow_runs[0].id' e2e-tests.json)
echo "Run ID: ${ID}"
## Get workflow run id for uberjar build
while [ -z "$JOB_ID" ]; do
NEXT_URL="https://api.github.com/repos/${{ github.repository }}/actions/runs/${ID}/jobs?filter=latest"
# Search for build job
echo "Searching for build job..."
while [ -z "$JOB_ID" ] && [ -n "$NEXT_URL" ]; do
# Get one page of jobs
RESPONSE=$(curl -s -i \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"$NEXT_URL")
# Extract headers and body
HEADERS=$(echo "$RESPONSE" | sed -n '1,/^\r$/p')
BODY=$(echo "$RESPONSE" | sed '1,/^\r$/d')
LINK_HEADER=$(echo "$HEADERS" | grep -i '^link:' | sed 's/^link: //')
# Check for next page in Link header
if echo "$LINK_HEADER" | grep -q 'rel="next"'; then
NEXT_URL=$(echo "$LINK_HEADER" | sed -E 's/.*<([^>]+)>; rel="next".*/\1/')
else
NEXT_URL=""
fi
# Check for build job
JOB_ID=$(echo "$BODY" | jq -r '.jobs[] | select(.name | contains("build (ee)")) | .id')
done
done
echo "Job ID: ${JOB_ID}"
## Wait for uberjar build to complete
while [ true ]; do
curl -Ls --output uberjar.json \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/jobs/${JOB_ID}
jq -r '.steps[] | select(.name == "Prepare uberjar artifact") | .status' uberjar.json | grep -q "completed" && break
echo "Waiting for uberjar build..."
sleep 10
done
echo "run_id=$(jq -r '.workflow_runs[0].id' e2e-tests.json)" >> $GITHUB_OUTPUT
- name: Retrieve uberjar artifact for ee
uses: actions/download-artifact@v4
uses: ./.github/actions/fetch-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ inputs.wait_for_uberjar && steps.wait_for_uberjar.outputs.run_id || github.run_id }}
extract-path: "target/uberjar"
output-name: "metabase.jar"
- name: Move uberjar to bin/docker
run: |
jar xf target/uberjar/metabase.jar

View File

@@ -9,9 +9,13 @@ concurrency:
cancel-in-progress: true
jobs:
uberjar:
if: ${{ github.event.label.name == 'PR-Env' }}
uses: ./.github/workflows/uberjar.yml
secrets: inherit
pr-env:
needs: [uberjar]
if: ${{ github.event.label.name == 'PR-Env' }}
uses: ./.github/workflows/pr-env.yml
with:
wait_for_uberjar: true
secrets: inherit

View File

@@ -3,11 +3,6 @@ run-name: Building Dynamic PR Environment for ${{ github.ref_name }} by @${{ git
on:
workflow_call:
inputs:
wait_for_uberjar:
description: "Wait for uberjar build"
required: false
type: boolean
jobs:
build:
runs-on: ubuntu-latest
@@ -31,69 +26,12 @@ jobs:
uses: aws-actions/amazon-ecr-login@v2
with:
registries: "${{ secrets.PR_ENV_AWS_ACCOUNT_ID }}"
- name: Wait for uberjar
id: wait_for_uberjar
if: ${{ inputs.wait_for_uberjar == true }}
run: |
## Get workflow run id for uberjar build
curl -Ls --output e2e-tests.json \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/workflows/run-tests.yml/runs?head_sha=${{ github.event.pull_request.head.sha || github.sha }}
ID=$(jq -r '.workflow_runs[0].id' e2e-tests.json)
echo "Run ID: ${ID}"
## Get workflow run id for uberjar build
while [ -z "$JOB_ID" ]; do
NEXT_URL="https://api.github.com/repos/${{ github.repository }}/actions/runs/${ID}/jobs?filter=latest"
# Search for build job
echo "Searching for build job..."
while [ -z "$JOB_ID" ] && [ -n "$NEXT_URL" ]; do
# Get one page of jobs
RESPONSE=$(curl -s -i \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
"$NEXT_URL")
# Extract headers and body
HEADERS=$(echo "$RESPONSE" | sed -n '1,/^\r$/p')
BODY=$(echo "$RESPONSE" | sed '1,/^\r$/d')
LINK_HEADER=$(echo "$HEADERS" | grep -i '^link:' | sed 's/^link: //')
# Check for next page in Link header
if echo "$LINK_HEADER" | grep -q 'rel="next"'; then
NEXT_URL=$(echo "$LINK_HEADER" | sed -E 's/.*<([^>]+)>; rel="next".*/\1/')
else
NEXT_URL=""
fi
# Check for build job
JOB_ID=$(echo "$BODY" | jq -r '.jobs[] | select(.name | contains("build (ee)")) | .id')
done
done
echo "Job ID: ${JOB_ID}"
## Wait for uberjar build to complete
while [ true ]; do
curl -Ls --output uberjar.json \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/actions/jobs/${JOB_ID}
jq -r '.steps[] | select(.name == "Prepare uberjar artifact") | .status' uberjar.json | grep -q "completed" && break
echo "Waiting for uberjar build..."
sleep 10
done
echo "run_id=$(jq -r '.workflow_runs[0].id' e2e-tests.json)" >> $GITHUB_OUTPUT
- name: Retrieve uberjar artifact for ee
uses: actions/download-artifact@v4
uses: ./.github/actions/fetch-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
github-token: ${{ secrets.GITHUB_TOKEN }}
run-id: ${{ inputs.wait_for_uberjar && steps.wait_for_uberjar.outputs.run_id || github.run_id }}
extract-path: "target/uberjar"
output-name: "metabase.jar"
- name: Move uberjar to bin/docker
run: |
jar xf target/uberjar/metabase.jar
@@ -107,7 +45,7 @@ jobs:
tags: ${{ secrets.PR_ENV_AWS_ACCOUNT_ID }}.dkr.ecr.us-east-1.amazonaws.com/metabase-enterprise:pr${{ github.event.number }}
push: true
deploy_pr:
needs: [ build ]
needs: [build]
runs-on: ubuntu-latest
name: PR Review ENV
permissions:
@@ -191,7 +129,7 @@ jobs:
kubectl apply -f ./metabase.yml
preview_links:
runs-on: ubuntu-latest
needs: [ deploy_pr ]
needs: [deploy_pr]
steps:
- uses: marocchino/sticky-pull-request-comment@v2
with:

View File

@@ -5,18 +5,12 @@ on:
workflow_dispatch:
inputs:
branch:
description: "Branch we want to release the SDK from"
description: "Branch we want to release the SDK from (to release from other branches use the workflow from those branches)"
type: choice
required: true
default: "master"
options:
- master
- release-x.51.x
- release-x.52.x
- release-x.53.x
- release-x.54.x
- release-x.55.x
- esbuild-main
concurrency:
# We want to ensure only one job is running at a time per branch because
@@ -177,41 +171,39 @@ jobs:
outputs:
sdk_version: ${{ fromJson(steps.new-sdk-version.outputs.result).version }}
major_version: ${{ fromJson(steps.new-sdk-version.outputs.result).majorVersion }}
pre_release_label: ${{ fromJson(steps.new-sdk-version.outputs.result).preReleaseLabel }}
steps:
- name: Check out the code using the provided branch
uses: actions/checkout@v4
with:
ref: ${{ inputs.branch }}
- name: Prepare build scripts
run: yarn --cwd release --frozen-lockfile && yarn --cwd release build
- name: Get current SDK version
id: current-sdk-version
run: |
VERSION=$(jq -r .version ./enterprise/frontend/src/embedding-sdk/package.template.json)
VERSION=$(jq -r .version ./enterprise/frontend/src/embedding-sdk-package/package.template.json)
echo "sdk_current_version=$VERSION" >> $GITHUB_OUTPUT
- name: Get next SDK patch version
- name: Get next SDK patch or pre-release version
id: new-sdk-version
uses: actions/github-script@v7
with:
script: |
const currentVersion = "${{ steps.current-sdk-version.outputs.sdk_current_version }}";
const [currentVersionWithoutSuffix, suffix] = currentVersion.split("-");
const versionParts = currentVersionWithoutSuffix.split(".");
versionParts[versionParts.length - 1] = parseInt(versionParts.at(-1)) + 1;
const newVersion = versionParts.join(".");
const [_, majorVersion] = versionParts
script: | #js
const { getNextSdkVersion } = require('${{ github.workspace }}/release/dist/index.cjs');
if (!suffix) {
return {
version: newVersion,
majorVersion
};
}
const branch = "${{ inputs.branch }}";
const currentVersion = "${{ steps.current-sdk-version.outputs.sdk_current_version }}";
const result = getNextSdkVersion(branch, currentVersion);
return {
version: `${newVersion}-${suffix}`,
majorVersion
}
version: result.version,
preReleaseLabel: result.preReleaseLabel,
majorVersion: result.majorVersion
};
- name: Append workflow summary
run: |
@@ -262,8 +254,6 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "release-sdk"
- name: Run unit tests
run: yarn embedding-sdk:test-unit
@@ -285,20 +275,14 @@ jobs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "release-sdk"
- name: Bump published npm package version
# NOTE: this should happen before "Build SDK bundle" as we inject SDK version into the code during build step
run: |
./bin/embedding-sdk/release_utils.bash update_package_json_template ${{ needs.determine-sdk-version.outputs.sdk_version }}
- name: Update changelog
run: |
yarn embedding-sdk:generate-changelog -o changelog-diff
- name: Build SDK bundle
run: yarn run build-embedding-sdk
- name: Build SDK package
run: yarn run build-embedding-sdk-package
- name: Generate SDK package.json in the build directory
run: yarn run embedding-sdk:generate-package
@@ -309,12 +293,6 @@ jobs:
name: metabase-sdk
path: ./resources/embedding-sdk
- name: Upload changelog diff
uses: actions/upload-artifact@v4
with:
name: sdk-changelog-diff
path: ./changelog-diff
publish-npm:
needs: [build-sdk, determine-sdk-version]
runs-on: ubuntu-22.04
@@ -335,6 +313,7 @@ jobs:
git config --global user.name "Metabase Automation"
- name: Update readme
if: inputs.branch != 'master'
run: |
bash ./bin/embedding-sdk/release_utils.bash update_readme ${{ env.sdk_version }}
@@ -342,25 +321,26 @@ jobs:
run: |
bash ./bin/embedding-sdk/release_utils.bash update_package_json_template ${{ env.sdk_version }}
- name: Retrieve SDK changelog diff
uses: actions/download-artifact@v4
with:
name: sdk-changelog-diff
- name: Update changelog
run: |
cat changelog-diff enterprise/frontend/src/embedding-sdk/CHANGELOG.md > new-changelog
mv new-changelog enterprise/frontend/src/embedding-sdk/CHANGELOG.md
- name: Create a PR updating readme + published version, and changelog (using GitHub Metabase Automation account)
- name: Create a PR updating readme + published version (using GitHub Metabase Automation account)
run: |
git checkout -b update-sdk-version-${{ env.sdk_version }}
git commit -a -m 'Update Readme version references and published npm version to ${{ env.sdk_version }}'
if [ "${{ inputs.branch }}" = "master" ]; then
COMMIT_MSG="chore(sdk): Update published npm version to ${{ env.sdk_version }}"
PR_TITLE="chore(sdk): Update SDK version to ${{ env.sdk_version }}"
PR_BODY="Update published npm package version to ${{ env.sdk_version }}"
else
COMMIT_MSG="docs(sdk): Update Readme version references and published npm version to ${{ env.sdk_version }}"
PR_TITLE="docs(sdk): Update SDK version to ${{ env.sdk_version }}"
PR_BODY="Update Readme version references and published npm package version to ${{ env.sdk_version }}"
fi
git commit -a -m "$COMMIT_MSG"
git push origin HEAD
gh pr create --base ${{ inputs.branch }}\
--assignee "${GITHUB_ACTOR}"\
--title "docs(sdk): Update SDK version to ${{ env.sdk_version }}"\
--body "Update Readme version references and published npm package version to ${{ env.sdk_version }}"
gh pr create --base "${{ inputs.branch }}" \
--assignee "${GITHUB_ACTOR}" \
--title "$PR_TITLE" \
--body "$PR_BODY"
env:
GH_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
@@ -388,15 +368,39 @@ jobs:
name: metabase-sdk
path: sdk
- name: Compute master tag
id: compute-tag
run: |
if [ -n "${{ needs.determine-sdk-version.outputs.pre_release_label }}" ]; then
echo "masterTag=${{ needs.determine-sdk-version.outputs.pre_release_label }}" >> $GITHUB_OUTPUT
else
echo "masterTag=nightly" >> $GITHUB_OUTPUT
fi
- name: Publish to NPM
working-directory: sdk
run: |
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_RELEASE_TOKEN }} > .npmrc
# Please keep the value in sync with `inputs.branch`'s release branch
npm publish --tag ${{fromJson('{"master": "nightly", "release-x.51.x": "51-stable", "release-x.52.x": "52-stable", "release-x.53.x": "53-stable", "release-x.54.x": "54-stable", "release-x.55.x": "55-stable", "esbuild-main": "56-esbuild"}')[inputs.branch]}}
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]'
)
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.55.x' }}
if: ${{ inputs.branch == 'release-x.56.x' }}
working-directory: sdk
run: |
npm dist-tag add @metabase/embedding-sdk-react@${{ env.sdk_version }} latest

View File

@@ -7,9 +7,7 @@ on:
- release-x.*
tags:
- v*
- nightly-*
- latest-*
- beta-*
workflow_dispatch:
inputs:
version:

View File

@@ -34,18 +34,23 @@ jobs:
AWS_S3_DOWNLOADS_BUCKET: test_bucket
with:
script: | # js
const { getChangelog } = require('${{ github.workspace }}/release/dist/index.cjs');
const R = require('${{ github.workspace }}/release/dist/index.cjs');
const fs = require('fs');
const version = '${{ inputs.version }}';
const notes = await getChangelog({
const issues = await R.getMilestoneIssues({
version,
github,
owner: context.repo.owner,
repo: context.repo.repo,
});
const notes = R.getWebsiteChangelog({
version,
issues,
});
fs.writeFileSync(`release-notes-preview-${version}.md`, notes);
- name: Upload Release Notes
uses: actions/upload-artifact@v4

View File

@@ -12,8 +12,6 @@ on:
description: Tag name to apply to this release
type: choice
options:
- nightly
- beta
- latest
required: true
tag_rollout:
@@ -36,8 +34,6 @@ on:
tag_name:
type: string
# options:
# - nightly
# - beta
# - latest
# - none (skips everything)
required: true
@@ -270,7 +266,7 @@ jobs:
token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
fetch-depth: 0 # we want all branches and tags
fetch-tags: true
- name: Add and push git tag for nightly/beta/latest
- name: Add and push git tag for latest
if: ${{ !inputs.dot-x-tag }}
run: | # sh
if [[ "${{ matrix.edition }}" == "ee" ]]; then

View File

@@ -17,8 +17,6 @@ on:
options:
- none
- latest
- beta
- nightly
required: true
default: 'none'
auto:
@@ -41,8 +39,6 @@ on:
# options:
# - none
# - latest
# - beta
# - nightly
required: true
default: 'none'
auto:
@@ -403,7 +399,9 @@ jobs:
});
trigger-ee-extra-pr:
needs: verify-s3-download
needs:
- containerize-ee
- verify-s3-download
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:

View File

@@ -8,9 +8,11 @@ on:
pull_request:
types: [opened, synchronize, reopened]
merge_group:
workflow_dispatch:
jobs:
files-changed:
if: ${{ !contains(github.event.pull_request.labels.*.name,'ci skip') }}
name: Check which files changed
runs-on: ubuntu-22.04
timeout-minutes: 5
@@ -22,6 +24,7 @@ jobs:
backend_all: ${{ steps.changes.outputs.backend_all }}
frontend_all: ${{ steps.changes.outputs.frontend_all }}
frontend_sources: ${{ steps.changes.outputs.frontend_sources }}
documentation: ${{ steps.changes.outputs.documentation }}
steps:
- uses: actions/checkout@v4
- name: Test which files changed
@@ -35,6 +38,7 @@ jobs:
static-viz-files-changed:
name: Check whether static-viz files changed
if: ${{ !contains(github.event.pull_request.labels.*.name,'ci skip') }}
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
@@ -45,8 +49,6 @@ jobs:
uses: ./.github/actions/prepare-frontend
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "files-changed"
- name: Build static-viz frontend
run: yarn build-static-viz
env:
@@ -64,14 +66,27 @@ jobs:
token: ${{ github.token }}
filters: .github/static-viz-sources.yaml
uberjar:
needs: [files-changed, static-viz-files-changed]
if: ${{ !cancelled() && !(needs.files-changed.outputs.documentation == 'true' && needs.files-changed.outputs.backend_all == 'false' && needs.files-changed.outputs.frontend_all == 'false' && needs.files-changed.outputs.e2e_all == 'false') }}
uses: ./.github/workflows/uberjar.yml
secrets: inherit
backend-tests:
if: ${{ !cancelled() }}
if: ${{ !cancelled() && needs.files-changed.result == 'success' }}
needs: [files-changed, static-viz-files-changed]
uses: ./.github/workflows/backend.yml
secrets: inherit
with:
skip: ${{ needs.files-changed.outputs.backend_all != 'true' && needs.static-viz-files-changed.outputs.static_viz != 'true' }}
semantic-search-tests:
needs: files-changed
uses: ./.github/workflows/semantic-search.yml
secrets: inherit
with:
skip: ${{ needs.files-changed.outputs.backend_all != 'true' }}
app-db-tests:
needs: files-changed
uses: ./.github/workflows/app-db.yml
@@ -95,7 +110,8 @@ jobs:
skip-lint: ${{ needs.files-changed.outputs.frontend_all != 'true' && needs.files-changed.outputs.e2e_specs != 'true' }}
e2e-tests:
needs: files-changed
needs: [files-changed, uberjar]
if: always() && !cancelled() && needs.files-changed.result == 'success'
uses: ./.github/workflows/e2e-tests.yml
secrets: inherit
with:
@@ -110,3 +126,23 @@ jobs:
needs: files-changed
uses: ./.github/workflows/embedding-sdk.yml
secrets: inherit
pr-env:
needs: [uberjar]
if: |
!cancelled() &&
contains(github.event.pull_request.labels.*.name, 'PR-Env')
uses: ./.github/workflows/pr-env.yml
secrets: inherit
containerize:
needs: [uberjar]
if: |
!cancelled() &&
needs.uberjar.result == 'success' &&
(
(github.event_name == 'push' && contains(fromJson('["master", "metabot-v3-main", "internal-tools"]'), github.ref_name)) ||
(github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'build-docker-uberjar'))
)
uses: ./.github/workflows/containerize-uberjar.yml
secrets: inherit

Some files were not shown because too many files have changed in this diff Show More