Compare commits

...

72 Commits

Author SHA1 Message Date
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
756 changed files with 183671 additions and 148946 deletions

View File

@@ -68,6 +68,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
@@ -501,6 +502,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
@@ -739,6 +741,7 @@ 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"}}}}

View File

@@ -601,7 +601,9 @@
metabase.lib.schema.join
metabase.lib.schema.literal
metabase.lib.schema.metadata
metabase.lib.schema.metadata.fingerprint
metabase.lib.schema.parameter
metabase.lib.schema.ref
metabase.lib.schema.template-tag
metabase.lib.schema.temporal-bucketing
metabase.lib.schema.util
@@ -1780,6 +1782,7 @@
models
plugins
premium-features
search
settings
setup
util

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

14
.github/team.json vendored
View File

@@ -8,7 +8,6 @@
"romeovs",
"bshepherdson",
"metamben",
"appleby",
"uladzimirdev",
"wzimrin",
"ericnormand",
@@ -40,7 +39,8 @@
"oisincoveney",
"npretto",
"heypoom",
"sanex3339"
"sanex3339",
"lorem--ipsum"
]
},
{
@@ -51,7 +51,6 @@
"piranha",
"crisptrutski",
"deniskaber",
"wotbrew",
"spalt08",
"stasgavrylov"
]
@@ -75,9 +74,6 @@
"members": [
"alxnddr",
"kulyk",
"tsplude",
"lorem--ipsum",
"noahmoss",
"bpander"
]
},
@@ -93,9 +89,13 @@
"name": "Metabot",
"label": ".Team/Metabot",
"members": [
"appleby",
"noahmoss",
"retro",
"sloansparger",
"somtom"
"somtom",
"wotbrew",
"tsplude"
]
},
{

View File

@@ -1,15 +1,20 @@
name: "[NOT REQUIRED] SDK Compatibility tests"
# Note: these are currently never called, we're skipping them as they're failing, below is the original triggers
on:
push:
branches:
- "master"
- "release-**"
pull_request:
types: [opened, synchronize, reopened]
branches:
- "master"
- "release-**"
workflow_call:
# Original trigger (commented for reference):
# on:
# push:
# branches:
# - "master"
# - "release-**"
# pull_request:
# types: [opened, synchronize, reopened]
# branches:
# - "master"
# - "release-**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}

View File

@@ -7,10 +7,10 @@ on:
- "master"
- "release-**"
paths:
- "frontend/src/metabase-lib/expressions/**"
- "frontend/src/metabase/querying/expressions/**"
pull_request:
paths:
- "frontend/src/metabase-lib/expressions/**"
- "frontend/src/metabase/querying/expressions/**"
jobs:
fe-fuzz-lexifier:
@@ -24,7 +24,7 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/pratt/fuzz.lexifier.unit.spec.ts
- run: yarn test-unit frontend/src/metabase/querying/expressions/pratt/fuzz.lexifier.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the lexifier
@@ -40,7 +40,7 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/fuzz.compiler.unit.spec.ts
- run: yarn test-unit frontend/src/metabase/querying/expressions/fuzz.compiler.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the custom expression compiler
@@ -56,7 +56,7 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- run: yarn test-unit frontend/src/metabase-lib/v1/expressions/fuzz.string.unit.spec.ts
- run: yarn test-unit frontend/src/metabase/querying/expressions/fuzz.string.unit.spec.ts
env:
MB_FUZZ: 1
name: Run fuzz testing on the custom expression string quoter

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.2 KiB

18
bb.edn
View File

@@ -155,8 +155,19 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Private Tasks:
;; - hidden from `./bin/mage` listing and `bb tasks`
;; - start with a `-`
;; These tasks are more for internal tooling, e.g. for use from git hooks etc.
;; - hidden from `./bin/mage` listing and `bb tasks`, these all - start with a `-`
-token-scan
{:doc "Security token scanner for detecting leaked API keys and secrets"
:examples [["./bin/mage -token-scan deps.edn bb.edn" "Scan specific files"]
["./bin/mage -token-scan -v deps.edn" "Scan with verbose output"]
["./bin/mage -token-scan -a" "Scan all files in the project"]]
:requires [[mage.token-scan :as token-scan]]
:options [["-a" "--all-files" "Scan all files in the project"]
["-v" "--verbose" "Verbose output"]]
:arg-schema [:sequential [:string {:description "Files to scan"}]]
:task (task! (token-scan/run-scan parsed))}
-repl
{:doc "Eval a string of clojure code in the backend dev server"
@@ -175,8 +186,7 @@
code (first (:arguments parsed))
port (or (:port (:options parsed))
(slurp ".nrepl-port")
(do (println (c/red "No port specified, and no .nrepl-port file found."))
(System/exit 1)))
(throw (ex-info (c/red "No port specified, and no .nrepl-port file found.") {:babashka/exit 1})))
nns (or (:namespace (:options parsed)) "user")]
(nrepl-eval nns code port))}

View File

@@ -108,7 +108,7 @@
steps (keys all-steps)}}]
(let [version (or version
(version-properties/current-snapshot-version edition))
start-time-ms (System/currentTimeMillis)]
timer (u/start-timer)]
(u/step (format "Running build steps for %s version %s: %s"
(case edition
:oss "Community (OSS) Edition"
@@ -121,7 +121,7 @@
{:step step-name
:valid-steps (keys all-steps)})))]]
(step-fn {:version version, :edition edition})
(u/announce "Did %s in %d ms." step-name (- (System/currentTimeMillis) start-time-ms)))
(u/announce "Did %s in %d ms." step-name (u/since-ms timer)))
(u/announce "All build steps finished.")))))
(defn build-cli

View File

@@ -23,10 +23,10 @@
(u/filename u/project-root-directory "target" "uberjar" "metabase.jar"))
(defn- do-with-duration-ms [thunk f]
(let [start-time-ms (System/currentTimeMillis)
result (thunk)
duration (- (System/currentTimeMillis) start-time-ms)]
(f duration)
(let [timer (u/start-timer)
result (thunk)
elapsed-ms (u/since-ms timer)]
(f elapsed-ms)
result))
(defmacro ^:private with-duration-ms [[duration-ms-binding] & body]

View File

@@ -24,8 +24,8 @@
(build-driver! driver edition nil))
([driver edition {:keys [project-dir target-dir], :as options}]
(let [edition (or edition :oss)
start-time-ms (System/currentTimeMillis)]
(let [edition (or edition :oss)
timer (u/start-timer)]
(binding [c/*driver-project-dir* (or project-dir
c/*driver-project-dir*)
c/*target-directory* (or target-dir
@@ -35,5 +35,5 @@
(copy-source-files/copy-source-files! driver edition)
(compile-source-files/compile-clojure-source-files! driver edition)
(create-uberjar/create-uberjar! driver edition)
(u/announce "Built %s driver in %d ms." driver (- (System/currentTimeMillis) start-time-ms))
(u/announce "Built %s driver in %d ms." driver (u/since-ms timer))
(verify/verify-driver driver))))))

View File

@@ -44,10 +44,10 @@
"Compile the Clojure source files for a driver."
[driver edition]
(u/step "Compile clojure source files"
(let [start-time-ms (System/currentTimeMillis)
source-paths (driver-source-paths driver edition)
target-dir (c/compiled-source-target-dir driver)
namespaces (source-path-namespaces source-paths)]
(let [timer (u/start-timer)
source-paths (driver-source-paths driver edition)
target-dir (c/compiled-source-target-dir driver)
namespaces (source-path-namespaces source-paths)]
(u/announce "Compiling Clojure source files in %s to %s" (pr-str source-paths) target-dir)
(u/create-directory-unless-exists! target-dir)
(u/announce "Compiling namespaces %s" (pr-str namespaces))
@@ -57,4 +57,4 @@
(compile a-namespace)))
(u/announce "Compiled %d namespace(s) in %d ms."
(count namespaces)
(- (System/currentTimeMillis) start-time-ms)))))
(u/since-ms timer)))))

View File

@@ -25,12 +25,12 @@
"Copy source files into the build driver JAR."
[driver edition]
(u/step (format "Copy %s source files" driver)
(let [start-time-ms (System/currentTimeMillis)
dirs (:paths (c/driver-edn driver edition))]
(let [timer (u/start-timer)
dirs (:paths (c/driver-edn driver edition))]
(assert (every? u/absolute? dirs)
(format "All dirs should be absolute, got: %s" (pr-str dirs)))
(u/announce "Copying files in %s" (pr-str dirs))
(copy-files dirs (c/compiled-source-target-dir driver))
(u/announce "Copied files in %d directories in %d ms."
(count dirs)
(- (System/currentTimeMillis) start-time-ms)))))
(u/since-ms timer)))))

View File

@@ -79,7 +79,7 @@
"Build a driver jar for `driver`, either an `:oss` or `:ee` `edition`."
[driver edition]
(u/step (format "Write %s %s uberjar -> %s" driver edition (c/driver-jar-destination-path driver))
(let [start-time-ms (System/currentTimeMillis)]
(let [timer (u/start-timer)]
(b/uber
{:class-dir (c/compiled-source-target-dir driver)
:uber-file (c/driver-jar-destination-path driver)
@@ -89,4 +89,4 @@
;; we need to skip this file since on MacOS it conflicts with other licenses, see:
;; https://ask.clojure.org/index.php/13231/switch-tools-build-pull-from-jars-rather-than-exploding-onto
:exclude ["META-INF/LICENSE"]})
(u/announce "Created uberjar in %d ms." (- (System/currentTimeMillis) start-time-ms)))))
(u/announce "Created uberjar in %d ms." (u/since-ms timer)))))

View File

@@ -55,6 +55,8 @@
[misc
parse-as-keyword
since-ms
start-timer
varargs]
[out

View File

@@ -13,6 +13,16 @@
(vary-meta `(into-array ~klass ~objects)
assoc :tag (format "[L%s;" (.getCanonicalName ^Class (ns-resolve *ns* klass)))))
(defn start-timer
"Return a relative timestamp for tracking durations. Treat this as opaque, it does not correspond to wallclock time."
[]
(System/nanoTime))
(defn since-ms
"Return how many milliseconds have elapsed since the given timer was started."
[timer]
(quot (- (System/nanoTime) timer) 1000000))
(defn parse-as-keyword
"Like [[clojure.core/keyword]], but with a couple of tweaks to make it better for parsing command-line args:

View File

@@ -8,12 +8,11 @@
[babashka.tasks :as bt]
[clojure.string :as str]
[mage.color :as c]
[mage.shell :as sh]
[mage.util :as u]))
(set! *warn-on-reflection* true)
(defn lolcat [f]
(defn- lolcat [f]
(if (try (u/sh "command -v lolcat")
(catch Exception _ false))
(bt/shell (str "lolcat " f))
@@ -22,7 +21,7 @@
(when (> (rand) 0.8)
(println (c/yellow "Tip: install lolcat for a better experience!"))))))
(defn invalid-task? []
(defn- invalid-task? []
(let [task-name (first *command-line-args*)]
(when-not (contains? (set (u/all-bb-tasks-list)) task-name)
(println (c/red (str "Unknown task: " task-name)))
@@ -33,7 +32,7 @@
(filter (fn [x] (str/starts-with? x "-"))
(str/split-lines (slurp "zen.md")))))
(defn tip-o-day []
(defn- tip-o-day []
(rand-nth
(concat ["Did you know? You can use `./bin/mage <task> --help` to get more information about a specific task."
"Pro tip: Use `./bin/mage <task>` to run a specific task."
@@ -51,6 +50,18 @@
(println (u/sh "./bin/bb tasks"))
(println (tip-o-day)))
(defn- summarize-exception [^Exception e]
(cond-> {:exception-type (-> e class .getName)
:ex-message (.getMessage e)}
;; Include ex-data if it's an ExceptionInfo
(instance? clojure.lang.ExceptionInfo e)
(assoc :data (ex-data e))
;; Recursively handle cause
(.getCause e)
(assoc :cause (summarize-exception (.getCause e)))))
(defn -main [& _]
(cond
;; help
@@ -73,12 +84,31 @@
(binding [*command-line-args* args]
(try (bt/run task)
(catch Exception e
;; To signal a problem in your mage task:
;; - Exceptions get summarized unless you set MAGE_DEBUG in your environment
;; so they aren't so noisy
;; - The ex-message will be printed
;; - The ex-data will be printed
;; - the (optional) `:babashka/exit` ex-data key will be used to determine the exit code
;; - the (optional) `:mage/error` ex-data key will suppress printing the entire exception,
;; use this when you know what the problem is and want to avoid noise
;;
;; Avoid using `System/exit` in your tasks, as it will hurt repl-ability of tasks: it will close the repl!
(let [message (ex-message e)
data (ex-data e)]
(when e (println (c/yellow "\nException:\n") e))
(when message (println (c/red (c/reverse-color "Error :")) message))
(when data (println (c/yellow (c/reverse-color "Error data:")) data))
(System/exit (:mage/exit-code data 1))))))))))
(when (and e (not (:mage/error data)))
(println (c/yellow "\nException:\n")
(cond-> e
(not (u/env "MAGE_DEBUG" (constantly nil)))
summarize-exception)))
(when (and message (not (str/blank? message)))
(println (c/red (c/reverse-color "ex-message : ")) message))
(when data
(println (c/yellow (c/reverse-color "ex-data : ")) (pr-str
(dissoc data :mage/error))))
(when (:mage/error data)
(println (c/blue (c/reverse-color "mage/error : ")) (:mage/error data)))
(System/exit (:babashka/exit data 1))))))))))
(when (= *file* (System/getProperty "babashka.file"))
(-main))

View File

@@ -64,7 +64,7 @@
com.vladsch.flexmark/flexmark-ext-autolink
{:mvn/version "0.64.8"} ; Flexmark extension for auto-linking bare URLs
commons-codec/commons-codec {:mvn/version "1.18.0"} ; Apache Commons -- useful codec util fns
commons-io/commons-io {:mvn/version "2.19.0"} ; Apache Commons -- useful IO util fns
commons-io/commons-io {:mvn/version "2.20.0"} ; Apache Commons -- useful IO util fns
commons-net/commons-net {:mvn/version "3.11.1"} ; Apache Commons -- useful network utils. Transitive dep of Snowplow, pinned due to CVE-2021-37533
commons-validator/commons-validator {:mvn/version "1.9.0" ; Apache Commons -- useful validation util fns
:exclusions [commons-beanutils/commons-beanutils
@@ -78,7 +78,7 @@
:exclusions [org.apache.poi/poi
org.apache.poi/poi-ooxml]}
environ/environ {:mvn/version "1.2.0"} ; env vars/Java properties abstraction
hiccup/hiccup {:mvn/version "1.0.5"} ; HTML templating
hiccup/hiccup {:mvn/version "2.0.0"} ; HTML templating
inflections/inflections {:mvn/version "0.14.2"} ; Clojure/Script library used for prularizing words
instaparse/instaparse {:mvn/version "1.5.0"} ; Make your own parser
io.github.camsaul/toucan2 {:mvn/version "1.0.565"}
@@ -250,7 +250,6 @@
{:mvn/version "0.4.0"} ; Enables easy memory measurement
com.gfredericks/test.chuck {:mvn/version "0.2.15"} ; generating strings from regexes (useful with malli)
criterium/criterium {:mvn/version "0.4.6"} ; benchmarking library
dev.weavejester/hashp {:mvn/version "0.4.0"} ; debugging/spying utility
djblue/portal {:mvn/version "0.59.1"} ; ui for inspecting values
io.github.camsaul/humane-are {:mvn/version "1.0.2"} ; cleaner test output
io.github.metabase/hawk {:sha "1fe839cfa48549e21b89c6418c747895eda7e7bc"} ; test runner
@@ -259,6 +258,7 @@
:exclusions
[org.ow2.asm/asm-all]}
lambdaisland/deep-diff2 {:mvn/version "2.12.219"} ; way better diffs
net.solovyov/hashp {:mvn/version "0.4.0-1"} ; debugging/spying utility
nrepl/nrepl {:mvn/version "1.3.1"} ; nREPL server
peridot/peridot {:git/url "https://github.com/piranha/peridot.git"
:sha "db627c627db3b527a63caf472f0422e4cbfdf574"} ; mocking Ring requests; waiting for upstream release of commit 0fc7c01 (explicit charset)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 49 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 87 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 49 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 197 KiB

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 169 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 KiB

After

Width:  |  Height:  |  Size: 123 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 92 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 33 KiB

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 135 KiB

View File

@@ -54,7 +54,6 @@ title: Driver interface changelog
`metabase.driver/upload-type->database-type` or `metabase.driver/allowed-promotions` -- make sure you use
`:metabase.upload/varchar-255` rather than something like `::upload/varchar-255`.
- Added the multi-method `metabase.driver.sql.parameters.substitution/time-grouping->replacement-snippet-info`. This is effectively `->replacement-snippet-info` for the new native query time grouping feature, but is its own separate multimethod because it needs an extra parameter.
- The `metabase.models.secret` namespace has been replaced with `metabase.secrets.core`; if you were using it please
update your usages.

View File

@@ -0,0 +1,44 @@
# Security Token Scanner
Security token scanner detects potentially leaked API keys and secrets in the Metabase codebase. Runs automatically as a git precommit hook on staged files.
## Usage
```bash
# Scan specific files
./bin/mage -token-scan deps.edn bb.edn
# Scan all files
./bin/mage -token-scan -a
# Verbose output
./bin/mage -token-scan -v deps.edn
```
## Token Types Detected
- Airgap tokens (`airgap_`)
- Dev tokens (`mb_dev_`, 64-char hex)
- OpenAI API keys (`sk-`)
- JWT/JWE tokens
- GitHub tokens (`gh[pousr]_`)
- Slack bot tokens (`xoxb-`)
- AWS access keys (`AKIA`)
The scanner uses `.gitignore` to filter files and will block commits containing detected tokens.
## False positives
If the scanner flags a non-token string, you should **exclude the literal token string** by adding it to: `mage/resources/token_scanner/token_whitelist.txt`.
```
echo 'my-token-string' >> mage/resources/token_scanner/token_whitelist.txt && git add mage/resources/token_scanner/token_whitelist.txt
```
## Bypassing (not recommended)
```bash
git commit --no-verify -m "commit message"
```

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.0 KiB

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -107,7 +107,7 @@ View the SDK's changelog:
## Embedded analytics SDK on NPM
Check out the Metabase Embedded analytics SDK on NPM: [metaba.se/sdk](https://metaba.se/sdk).
Check out the Metabase Embedded analytics SDK on NPM: [metaba.se/sdk-npm](https://metaba.se/sdk-npm).
## SDK limitations

Binary file not shown.

Before

Width:  |  Height:  |  Size: 148 KiB

After

Width:  |  Height:  |  Size: 125 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 KiB

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 111 KiB

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 46 KiB

After

Width:  |  Height:  |  Size: 40 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -104,7 +104,7 @@ Now go to the next step where you will select:
- **Options**: Single container.
- **Image source**: DockerHub.
- **Access Type**: Public.
- **Image and tag**: metabase/metabase:latest (or choose any other docker image tag of your preference, like our Enterprise Edition). To find the latest version, check our [Community Edition Dockerhub repository](https://hub.docker.com/r/metabase/metabase/tags?page=1&ordering=last_updated) and also our [Enterprise Edition Dockerhub Repository](https://hub.docker.com/r/metabase/metabase-enterprise/tags?page=1&ordering=last_updated).
- **Image and tag**: metabase/metabase:latest (or choose any other docker image tag of your preference, like our Enterprise Edition). To find the latest version, check our [Community Edition Docker Hub repository](https://hub.docker.com/r/metabase/metabase/tags?page=1&ordering=last_updated) and also our [Enterprise Edition Docker Hub Repository](https://hub.docker.com/r/metabase/metabase-enterprise/tags?page=1&ordering=last_updated).
- **Startup command**: Leave this field empty.
Click **Next** until you get to the last section, then click **Create**, and wait while your application initializes.

View File

@@ -8,7 +8,7 @@ redirect_from:
> To get fast, reliable, and secure deployment with none of the work or hidden costs that come with self-hosting, check out [Metabase Cloud](https://www.metabase.com/cloud/).
Metabase provides an official Docker image via Dockerhub that can be used for deployments on any system that is running Docker.
Metabase provides an official Docker image via Docker Hub that can be used for deployments on any system that is running Docker.
If you're trying to upgrade your Metabase version on Docker, check out these [upgrading instructions](upgrading-metabase.md).

Binary file not shown.

Before

Width:  |  Height:  |  Size: 194 KiB

After

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 317 KiB

After

Width:  |  Height:  |  Size: 528 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 KiB

After

Width:  |  Height:  |  Size: 405 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 KiB

After

Width:  |  Height:  |  Size: 426 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 421 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 KiB

After

Width:  |  Height:  |  Size: 485 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 421 KiB

After

Width:  |  Height:  |  Size: 469 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 69 KiB

View File

@@ -61,7 +61,9 @@ For example, to add the attribute "First name":
## Setting up synchronize group membership
1. In Google Admin, setup a multi-value [custom user attribute](https://support.google.com/a/answer/6208725?hl=en#zippy=%2Cadd-a-new-custom-attribute) for your users (recommended if you manage multiple SAML app permissions in Google or do not have existing Google Groups that align with your desired Metabase groups) OR [map to existing Google Groups](https://support.google.com/a/answer/11143403?hl=en).
1. In Google Admin, you can EITHER:
- Set up a multi-value [custom user attribute](https://support.google.com/a/answer/6208725?hl=en#zippy=%2Cadd-a-new-custom-attribute) for your users. Recommended if you manage multiple SAML app permissions in Google or if you lack existing Google Groups that align with your desired Metabase groups.
- [Map to existing Google Groups](https://support.google.com/a/answer/11143403?hl=en).
2. Follow the instructions for [Configuring the group schema](./authenticating-with-saml.md#configuring-the-group-schema-in-metabase) using the `App attribute` that you used in Google as the Group attribute name in Metabase.
## Troubleshooting SAML issues

Binary file not shown.

Before

Width:  |  Height:  |  Size: 204 KiB

After

Width:  |  Height:  |  Size: 197 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 KiB

After

Width:  |  Height:  |  Size: 134 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 94 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 44 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 366 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 92 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 77 KiB

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 226 KiB

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 122 KiB

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 188 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 160 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB

After

Width:  |  Height:  |  Size: 131 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 108 KiB

After

Width:  |  Height:  |  Size: 148 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 15 KiB

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