Compare commits

...

360 Commits

Author SHA1 Message Date
Timothy Dean
2e7e583792 The thing I didn't want to push before the demo 2025-10-15 23:00:05 +02:00
Fraser
7b19689e37 Add representation to markdown 2025-10-15 15:34:32 +02:00
Eric Normand
126a3ac3c3 export export-set from collection 2025-10-15 15:18:05 +02:00
Timothy Dean
97ad3b6b55 Importing documents in whole-collection import works 2025-10-15 15:12:42 +02:00
Timothy Dean
4f54de38fd Fix build 2025-10-15 14:44:26 +02:00
Timothy Dean
7385a67320 Documents export correctly with collections 2025-10-15 14:28:52 +02:00
Fraser
29d10ebbc6 Handle tiptap fromat for serialize 2025-10-15 14:03:19 +02:00
Fraser
062667d672 Convert to tiptap format 2025-10-15 13:47:27 +02:00
Eric Normand
3c4a14b782 Fix content import 2025-10-15 13:25:40 +02:00
Timothy Dean
29a5ee8add Handle documents on collection export 2025-10-15 13:07:00 +02:00
Timothy Dean
ec8c51bcbb Handle refs inside markdown 2025-10-15 04:37:31 -06:00
Eric Normand
c45bd0204e refs + collection import 2025-10-15 12:24:46 +02:00
Fraser
095aef4f25 Create markdown-to-representation 2025-10-15 12:19:48 +02:00
Timothy Dean
6e9421b3c4 Parse ProseMirror back into markdown 2025-10-15 03:48:07 -06:00
Timothy Dean
774f7907e8 Delete babashka script 2025-10-15 03:34:03 -06:00
Eric Normand
807792b3ed markdown import 2025-10-15 11:27:56 +02:00
Timothy Dean
a6f57c9cdc Pipe into stdin 2025-10-15 03:17:58 -06:00
Timothy Dean
ebe0a440b8 Verbose mode 2025-10-15 03:13:52 -06:00
Eric Normand
ae4079a04d tests pass 2025-10-15 10:53:39 +02:00
Timothy Dean
1deddf696a Add resizeNode and flexContainer 2025-10-15 02:47:12 -06:00
Timothy Dean
e5b1dfaf19 Starting to convert MD to ProseMirror, with examples 2025-10-15 10:31:58 +02:00
Eric Normand
07940a8830 Rock the document export import api 2025-10-15 10:21:34 +02:00
Eric Normand
9834c047f3 Merge remote-tracking branch 'origin/representations' into public-documents 2025-10-15 08:51:59 +02:00
jeff bruemmer
aeb74fd78f add iframe code 2025-10-14 17:57:13 +02:00
jeff bruemmer
ffe367bf5b public styles 2025-10-14 17:05:40 +02:00
Eric Normand
0fc449bb3f First pass at better import (WIP) 2025-10-14 13:55:33 +02:00
jeff bruemmer
b70e78e880 spacing 2025-10-14 11:37:57 +02:00
Jeff Bruemmer
c6bdd8e3c4 Merge branch 'master' into public-documents 2025-10-14 11:09:55 +02:00
jeff bruemmer
481af4d032 add scrollintoview 2025-10-14 10:46:44 +02: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
jeff bruemmer
5b8dbbd82a update test 2025-10-13 17:33:22 +02:00
jeff bruemmer
bee843e64a type check 2025-10-13 16:27:40 +02:00
jeff bruemmer
844ae009e0 serdes 2025-10-13 16:12:56 +02:00
Nemanja Glumac
963be74964 Remove deprecated Lib.displayName (#64647) 2025-10-11 17:32:19 +02:00
Eric Normand
0ccfcf9368 At leasts the tests pass 2025-10-10 23:06:49 -05:00
Eric Normand
f920a0ad6b Work with lib in transforms??? 2025-10-10 22:59:52 -05:00
Eric Normand
ad03eb5e71 Fix transform tests 2025-10-10 22:54:28 -05:00
Eric Normand
968ab66658 Get lib questions working (with tests) 2025-10-10 22:41:56 -05: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
jeff bruemmer
d5c27a9dd2 add made_public_by_id 2025-10-10 17:38:41 -04:00
jeff bruemmer
1ef3c8bbf5 add rollback 2025-10-10 17:37:38 -04:00
jeff bruemmer
85a21d2fe3 update migrations 2025-10-10 17:24:32 -04: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
jeff bruemmer
cef12f1fd6 remove whitespace 2025-10-10 16:46:04 -04:00
jeff bruemmer
690539f6e5 fix test 2025-10-10 16:37:28 -04:00
Timothy Dean
531c0a2ec0 Tweaking mbql.clj 2025-10-10 13:46:38 -06: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
jeff bruemmer
52d3ab245d handle removal 2025-10-10 15:16:58 -04:00
Timothy Dean
361b089ae6 Fix nesting bug in mbql.clj, re-enable a models test 2025-10-10 13:13:50 -06:00
jeff bruemmer
1d176a30f8 fix tests 2025-10-10 14:56:38 -04:00
Timothy Dean
f868deee6b Models and their metadata working much better 2025-10-10 12:55:18 -06:00
Timothy Dean
e24dd51f77 Land bugfixes in flow we're not using any longer, but it's related to the collections.yml ticket 2025-10-10 12:54:41 -06: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
jeff bruemmer
aff97b68ab formatting 2025-10-10 14:15:57 -04: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
jeff bruemmer
77b8c85ec5 update kondo 2025-10-10 14:06:23 -04:00
jeff bruemmer
53f12b1991 config updates 2025-10-10 14:02:46 -04: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
Eric Normand
a8c3bf86bf Missed a reference 2025-10-10 12:31:11 -05: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
Eric Normand
f77ee2c518 Oops cyclical dep 2025-10-10 12:27:42 -05:00
Eric Normand
126768e0b4 Cleanup mbql stuff 2025-10-10 12:27:08 -05:00
Riley Thompson
a0088a70e2 Merge branch 'representations' of https://github.com/metabase/metabase into representations 2025-10-10 13:24:43 -04:00
Riley Thompson
64860019bc add snippet import tests 2025-10-10 13:24:33 -04:00
jeff bruemmer
63f83639c8 check if column exists 2025-10-10 13:13:48 -04:00
jeff bruemmer
b1c80cdab8 parens 2025-10-10 13:09:24 -04:00
jeff bruemmer
7d31d86463 new lines 2025-10-10 13:06:43 -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
Jeff Bruemmer
d07484ccc6 Merge branch 'master' into public-documents 2025-10-10 12:53:33 -04: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
jeff bruemmer
cd8b716101 migrations 2025-10-10 12:52:21 -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
Eric Normand
b899d8cd97 Update test 2025-10-10 11:23:54 -05:00
Eric Normand
fc0f79e339 Export only schemas and tables that are referred to 2025-10-10 11:22:55 -05:00
jeff bruemmer
405b516f46 comments 2025-10-10 11:36:58 -04: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
jeff bruemmer
36de975d44 charts in documents 2025-10-10 09:50:59 -04:00
Nicolò Pretto
49152f6a36 Make the e2e create a copy of the sample db, so it doesn't run into locking issues with core app (#64120)
* poc of allowing us to run the backend and the e2e at the same time

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

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

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

* Add MetabotLogo stories and test them with Loki

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

---------

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

* Fix divider logic

* Fix bogus skipToken usage

* Exclude models and some cases

* Add more permission checks

* Move QuestionAlertsMenuItem

* Fix permissions check

* Move unit tests

* Inline setup

* Move tests

* Fix modal situation

* Fix invalid export

* Rename dir

* Update onboarding

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Update tests

* Change order
2025-10-10 12:54:52 +07:00
Mahatthana (Kelvin) Nomsawadi
27d6352a93 Fix value between optional parameters without values not visible (#64550) 2025-10-10 04:56:37 +01:00
Fraser
b12bc41d58 Delete e2e Save modal test (#64350) 2025-10-10 15:48:35 +13:00
Fraser
14f4f37e34 Delete skipped relative time-view-rendering e2e test (#64499) 2025-10-10 15:48:10 +13:00
Fraser
accf8b0b06 Delete skipped filters repro e2e test (#64495) 2025-10-10 15:47:39 +13:00
Riley Thompson
60050841a2 snippet export test 2025-10-09 18:35:32 -04:00
jeff bruemmer
42dc718305 basic public documents 2025-10-09 17:46:10 -04:00
Marcos
376daff947 fix transforms snippet sidebar add/edit button (#64575) 2025-10-09 18:00:00 -03:00
Eric Normand
bc8d0d0423 Metrics import/export tests 2025-10-09 15:02:19 -05: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
Riley Thompson
75de8e0572 remove static serve code from 3312f91 and 89bf939 2025-10-09 15:21:57 -04:00
Riley Thompson
9b1198ce7b remove frontend code 2025-10-09 14:50:58 -04: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
Riley Thompson
f1cb9c64fd use refs directory for db representations 2025-10-09 11:43:48 -04:00
Riley Thompson
80af50a637 replace content with sql in snippet representation 2025-10-09 11:29:22 -04:00
metamben
9b0bfe3815 Fix base-type inference in pivot queries (#64472)
* Fix base-type inference in pivot queries

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

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

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

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

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

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

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

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

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

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

* fix sidebar width in transforms page

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

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

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

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

* Remove metabot from command palette

* Remove footer

* Style search input

* Icon color

* Remove actions section when there is no search query

* Rename 'recent items' to 'recents'

* Show 10 recents by default

* Style item

* Update copy (Search results -> Results)

* Use project react import convention

* Move link to search results to group header

* Close palette on results link click

* Fix types

* Use disabled prop in useCommandPalette

* Update item bg

* Align search icon

* Update color whem is active

* Update table icon

* Fix wrong item being selected

* Use stack

* Fix icons shrinking

* Hide subtext on overflow

* Update unit tests

* Fix types

* Clean up

* Hide actions in a different way

* Update helper

* Remove redundant changes

* Update unit tests

* Update unit tests

* Update helper

* Update test

* Update test

* Update tests

* Update test

* Update test

* Update tests

* Add a border to search input

* Update test

* Simplify text overflow handling

* Avoid parent().parent()

* ESLint

* Improve assertion

* Improve assertion

* Remove borders between result groups in command palette

* update styles of the app bar (#64105)

* update styles of the app bar

* rework profilelink to ts

* fix some tests

* fix another e2e test

* update search style

* fix shortcuts conflict

* unify search buttons between oss and enterprise

* don't translate metakey

* fix colors

* let's have two keydown handlers

* fix test

* fix typecheck

* address review comments

* fix showplow event in test

* show metabot icon on small screens

* fix test

* do not show metabot button within iframe

* attempt to fix flaky test

* lint

* address review comments

* address review comments

* add a unit test

* update colors

* address comments

* update skeleton

---------

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

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

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

makes export types checker happy

remove source

* add stories

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

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

* Restore the docstring indentation rule
2025-10-09 05:59:47 +00:00
Cam Saul
0ee3c2ffae Make claude code review bot delete old comments (#64544) 2025-10-08 23:40:29 -06:00
Alex Yarosh
c0a07d369c docs: emphasize revoking SQL access for some permissions (#64539)
* docs: emphasize revoked SQL access for some permissions

Clarified permissions regarding native queries in Metabase.

* Update docs/permissions/data.md

* Update docs/permissions/data.md

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

---------

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

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

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

* trying to retrigger when labels change

---------

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

* create a util file

* add a note

* add tests

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

* Commenting Props
2025-10-08 16:49:14 -04:00
Riley Thompson
0ac69e8f89 Merge branch 'representations' of https://github.com/metabase/metabase into representations 2025-10-08 16:33:14 -04:00
Riley Thompson
2b3a76cf5b use lib native to build template tags 2025-10-08 16:33:09 -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
Eric Normand
a4acab9eff Dependency check API and beginnings of import 2025-10-08 13:32:22 -05:00
Riley Thompson
8dd09eaf20 Merge branch 'representations' of https://github.com/metabase/metabase into representations 2025-10-08 14:06:53 -04:00
Riley Thompson
085b060c4c add template tags to sql snippetes yaml->toucan 2025-10-08 14:06:43 -04:00
Timothy Dean
fb34fc1654 babashka import: manually fix a few issues, but the code organization is pretty bad 2025-10-08 11:00:46 -06: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
Riley Thompson
ca9f37c05f replace versioned :type key with separate :version and :type keys 2025-10-08 12:16:47 -04:00
Phoomparin Mano
2333182a53 fix(sdk-bundle): missing hover text color in summarization/grouping menus (#64515) 2025-10-08 21:50:05 +07:00
lbrdnk
c12d988306 Revert "Ajust e2e runner options (#64377)" (#64516)
This reverts commit 2375d46cbb.
2025-10-08 14:49:18 +00:00
github-automation-metabase
d19bc1dde6 Update generated docs (master) (#64498)
Co-authored-by: github-actions <github-actions@github.com>
2025-10-08 09:42:16 -04:00
Noah Moss
463ab32c31 Fix Firefox bug where models are not clickable until after selecting & unselecting text (#64491) 2025-10-08 09:29:47 -04:00
Timofey Kachalov
c6f8933e3e Extract SDK bundle error handling tests into a separate test suite (#64502) 2025-10-08 17:22:15 +04:00
Stas Gavrylov
f15ed1a734 WRK-907: [Bug][Data Editing] Do not offer to 'Add option' in FK fields (#64304)
* WRK-907: Remove 'create new' option from table action input for FK parameters

* Address PR comments

* Address PR comments

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

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

* Apply suggestions from code review

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

---------

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

* fix sleep test

* kondo

* fix: copy chan, else QP closes it
2025-10-08 12:49:54 +01:00
Nicolò Pretto
82aba4c51d rename tests folder to stories (#64455) 2025-10-08 10:31:38 +00:00
Kamil Mielnik
2dfdc3683b DSN-69 Smart Scalar charts in dashboards shouldn't overflow their card (#64285)
* Move SmartScalar subcomponents to separate files

* Update getValueHeight to support multiple comparisons

* Fix dashcard header height

* Fix overflow with cheap tactics

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

* Fix line height

* Move PreviousValueComparison to its own directory

* Extract DetailCandidate

* Extract VariationPercent

* Extract DetailCandidate

* Remove inTooltip prop in VariationPercent

* Add hidden comparisons to the tooltip

* Update constant

* Add ellipsis badge

* Do not use " • " as text separator

* Make tooltip text white

* Wrap text in the tooltip

* Fix text alignment

* Revert static viz change

* Add e2e test

* Update tests

* Update Loki Snapshots

* Remove separator in static viz

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-08 17:27:38 +07:00
Nicolò Pretto
be441ae625 refactor(sdk): move trasnformSdkQuestion (#64458) 2025-10-08 11:58:27 +02:00
Romeo Van Snick
70d8fda6fa Humanize error messages (#63235)
* Allow passing error/friendly in malli schema's to declare them to be be safe for users to see

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

* Allow :error/message to be a thunk

* Add repro for metabase#61893

* Use deferred-tru for error message

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

- callbacks were not passed and clj-http would throw

* Fix data correctness issue if cancelled during table read

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

* Add cancellation test

* Give script a bit more time for CI

* Disable cancellation test for problematic drivers

* Also disable redshift

* Also disable mongo

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

* Remove comments from UI for embedded scenario

* Make isWithinIframe check external for CommentsMenu

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

* Update Loki Snapshots

---------

Co-authored-by: stasgavrylov <stasgavrylov@gmail.com>
Co-authored-by: Metabase Automation <github-automation@metabase.com>
2025-10-08 10:28:01 +02:00
Oleksandr Solovyov
4e7e3f10bc pivot download: use source alias name for matching columns (#64192) 2025-10-08 11:21:23 +03:00
Fraser
46c6bcd677 Error a test that accesses unmocked routes (#64311) 2025-10-08 16:19:43 +13:00
Oleksandr Solovyov
42d5d4f442 make db removal somewhat more efficient (#64366) 2025-10-08 05:53:06 +03:00
Timothy Dean
2ebdcb6139 Init commit for representation.bb 2025-10-07 19:00:23 -06: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
Riley Thompson
1300e4fe2d Merge branch 'representations' of https://github.com/metabase/metabase into representations 2025-10-07 18:30:55 -04:00
Riley Thompson
ee5c71754a sql snippet representations 2025-10-07 18:30:49 -04:00
Eric Normand
e0790dda10 Structural change for better recursion 2025-10-07 16:21:41 -05:00
Eric Normand
ca30b7d361 Export entire collection (API) 2025-10-07 16:18:08 -05:00
Jeff Bruemmer
1e5fba41ed remove docs workflows (#64486) 2025-10-07 20:58:12 +00:00
Eric Normand
6697c05014 Can check question dependencies 2025-10-07 15:39:54 -05: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
Eric Normand
56e70074d0 Merge branch 'representations' of github.com:metabase/metabase into representations 2025-10-07 12:15:01 -05:00
Eric Normand
7e0b5e85cd Don't use ref/ namespace 2025-10-07 12:14:34 -05:00
Timothy Dean
e7154969aa Delete a ton of code and experimental feature work. 2025-10-07 10:46:25 -06:00
Noah Moss
8a4a4273a7 fix local test failure by sorting related_table ids in metabot tool response (#64464) 2025-10-07 15:41:55 +00:00
lbrdnk
2375d46cbb Ajust e2e runner options (#64377) 2025-10-07 16:53:18 +02:00
Noah Moss
4215b09ac7 Split fields returned to metabot for cards/models into core fields and related_tables (#64385)
* Split fields returned for cards/models into core fields and related_tables

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

* typo

* fix kondo

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

* add test for new flag

* fix malli recursive schema

* add back query-needed?

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

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

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

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

* Add getCurrencySymbolNative

* Add narrow symbol support

* Update unit tests

* Add test

* Add e2e test

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

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

* Fix #54317: Added an e2e test

* Adjust test to new filters

---------

Co-authored-by: Sébastien <sebastien@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub.chodorowicz@metabase.com>
Co-authored-by: Jakub Chodorowicz <jakub@chodorowicz.com>
2025-10-07 12:00:54 +01:00
Fraser
d14019cd02 Delete skipped e2e download test that has BE tests (#64442) 2025-10-07 22:48:07 +13:00
Uladzimir Havenchyk
a5d6067de1 chore: migrate renderer_utils from moment to dayjs (#64413) 2025-10-07 12:40:11 +03:00
Timofey Kachalov
8f9a72345b Minor refactoring of services.js (#64408) 2025-10-07 13:18:01 +04:00
Fraser
f14ae0297b Unskip working pivot-tables test (#64349) 2025-10-07 13:35:59 +13:00
Vamsi Peri
952aeefd58 Dark mode (#64016)
* js source of truth for colors

* use more betterer colors

* keyboard shortcut for toggling dark mode

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

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

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

* Revert 3301ed93693

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

* Fix TS errors

* Fix text color and random white bg on permissions table

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

* Updates mantine color scheme when resolvedColorScheme changes

* a bunch more

* fix progress bars. shame on Nick

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

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

* add orionAlphaInverse colors

* make lighthouse illustration work with CSS vars

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

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

* Fix upsell CTA hover color in dark mode

* Tweaks admin nav dark mode color

* some small fixes

* Fixes some incorrect brand color values when white-labeling

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

* Fix gauge visualization text/input colors in dark mode

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

* Fixes a few filter chip stragglers in dark mode

* metabot visits the dark side

* Use ColorSchemeToggle for dashboard night mode button

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

* Update color.ts

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

This reverts commit 06a504c088e31c60aca7c7550aa24a0f32edba6c.

* set color scheme for scrollbars

* hard to see toggle in database info

* Embedding and other fixed

* fix blue brand

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

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

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

* Fixes some TS errors

* happy-ish static viz

* only resolve to color var if name is known

* type corrections, removing auto color scheme

* Passes storybook theme arg to ThemeProvider

* add konami code shortcut for Vamsi

* Fix dashboard context TS errors

* Fix runtime warning

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

* re-enable updateColors

* happy types

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

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

* green unit tests?

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

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

* handfull of e2e suites

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

* Restores SdkError colors on dark mode (#64306)

* happy unit and e2e tests?

* Fix lint errors

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

* fix card shadow crash

* backdrop color fix

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

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

* embedding e2e, unit tests

* Fix TS error

* update colorConfig for sdkThemeProvider

* force e2e to run in light mode

* Fix embedding-sdk:docs:generate error

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

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

* Replace hardcoded value with already-defined constant

* fix quotes in css

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

* use firefox compatible scale

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

* fix css quotes

* fix color scheme toggle

* fix test

* fix conflict

* update test

* PR Feedback

* fix embedding homepage flicker

* e2e adjustment

* adding text-hover, fixing checkbox border

* setup.cy green plz

* e2e test for toggling color scheme

* e2e plz

* type check

* e2e adjustment

* Update Loki Snapshots

* test colors in RGB

* OS check for shortcut

---------

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

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

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

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

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

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

* test that api works for these queries

* enable feature in test
2025-10-06 16:22:02 -05:00
John Swanson
b9b78a2f60 Show audit links for non-admins with perms (#64201)
If a user isn't an admin but has permission to view the Usage Analytics
collection they should see links in the card sidebar.
2025-10-06 13:39:41 -07:00
Timofey Kachalov
1a28ee25c3 refactor(embed-js): Refactor EmbedJS wizard to prepare it for No-user embedding (#64411) 2025-10-06 23:50:20 +04:00
Timothy Dean
471e76be64 Whitespace 2025-10-06 13:01:42 -06:00
Timothy Dean
25908d5f96 Fix core-test 2025-10-06 12:53:41 -06:00
Timothy Dean
42f5d6cc13 Merge remote-tracking branch 'origin/master' into representations 2025-10-06 12:44:46 -06:00
Edward Paget
54919da812 Remove parallel annotation from tests (#64386) 2025-10-06 18:43:43 +00:00
Timothy Dean
e3a9edcb7a Fix question-test 2025-10-06 12:41:56 -06:00
Timothy Dean
cf1c863b2b Fix YAML dumper-options, filenames, misc. 2025-10-06 12:19:26 -06:00
Timothy Dean
f7db036c73 Add latest export examples 2025-10-06 12:18:09 -06:00
Alex Yarosh
11fec69c5e docs: price change (#64426) 2025-10-06 14:17:23 -04:00
Timothy Dean
49cb9edfa7 Fix topological sort for base64-encoded mbql 2025-10-06 11:10:36 -06:00
Dan Stone
d12930529f Add /ee/python-transforms/test-run to preview a run (#64362)
The python code is executed by the runner but its output is not saved back. The endpoint blocks
until the output is received.

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

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

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

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

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

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

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

* Fix SDK build to not include test files

* Fix the config to allow __support__/metadata

* Revert a file I thought was a test file

* Make rules consistent

* Clean up tsconfig pattern

* Make the error message less repeatable
2025-10-06 03:30:12 +01:00
Timothy Dean
0fd583ee05 Non-cleaned-up, but new tests and metadata overrides for models. Mix of hand and vibe code, cleanup needed 2025-10-04 00:57:43 -06:00
Timothy Dean
a33fee2435 MBQL separated as base64-encoded blob 2025-10-03 23:33:53 -06:00
Phoomparin Mano
38260ca608 Remove unused EmbeddingSetup components and hooks (#63841) 2025-10-04 07:05:14 +07:00
Timothy Dean
de107e5639 Add forgotten file. 2025-10-03 17:20:59 -06:00
Timothy Dean
339ce9b24c export-import-with-refs-test 2025-10-03 17:12:09 -06:00
Timothy Dean
07b6dcd9ea export-with-refs and export-with-ids 2025-10-03 16:56:57 -06:00
Timothy Dean
560a3b67f0 Cleanup, about to refactor to allow bimodal exports 2025-10-03 15:39:08 -06:00
Eric Normand
d8ae013339 Ooops! 2025-10-03 15:58:36 -05:00
Eric Normand
ad06c09272 Transforms work! 2025-10-03 15:35:38 -05: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
Timothy Dean
b0d38931d0 Some fixes, mostly around models 2025-10-03 12:15:50 -06: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
Eric Normand
30f997054b Make question tests pass 2025-10-01 16:51:44 -05:00
Eric Normand
bc73878e2a Fix kondo and remove bad docstring 2025-10-01 14:07:41 -05:00
Eric Normand
2bdaa1ca68 Make export-set take a collection of reps 2025-10-01 14:07:23 -05:00
Eric Normand
949633567d Whitespace in cond 2025-10-01 14:06:57 -05:00
Eric Normand
ee68edecae Fix question test 2025-10-01 14:06:45 -05:00
Eric Normand
6b055d5133 Use u/remove-nils instead of custom one 2025-10-01 13:36:55 -05:00
Timothy Dean
c39e42692c Fix circular dependencies 2025-09-30 23:55:11 -06:00
Timothy Dean
34dc6533b2 Cleaning up a little, and resolving 104 kondo warnings 2025-09-30 22:52:08 -06:00
Timothy Dean
46bf926ee3 Get import/export buttons working more nicely (for database.yml and question.yml only) 2025-09-30 16:13:12 -06:00
Riley Thompson
54389ff03a fix collection script 2025-09-30 17:10:01 -04:00
Riley Thompson
13a76e983e Merge branch 'master' into representations 2025-09-30 17:04:15 -04:00
Riley Thompson
34b84f3151 download and upload transform represenations 2025-09-30 17:02:04 -04:00
Timothy Dean
d65e9c8ec4 Merge duplicated work, get batch-imports working for at least questions and databases.
Eric and I duplicated some work. This merges our efforts. This also builds in ref patching on import and export and provides an `import-dir!` method that #worksonmymachine.

Co-authored-by: Eric Normand <ericwnormand@gmail.com>
2025-09-29 14:23:59 -06:00
Timothy Dean
29263dad18 Fix circular dependency, clean up some code 2025-09-26 15:15:13 -06:00
Eric Normand
b70431b8f6 Match existing database by name or do nothing. 2025-09-26 12:47:46 -05:00
Eric Normand
57c7b6e15c Database api and better yaml format 2025-09-26 11:45:03 -05:00
Eric Normand
9b0a44d385 Update database export
Env vars for passwords and other secure details
2025-09-26 11:41:56 -05:00
Eric Normand
c0bec3f32e Remove question 2025-09-26 11:41:38 -05:00
Eric Normand
2510bae3c2 Tests 2025-09-26 11:09:46 -05:00
Eric Normand
1dad0e5c1e Import ordering 2025-09-25 15:25:27 -05:00
Eric Normand
a9be96bbd2 Merge branch 'representations' of github.com:metabase/metabase into representations 2025-09-25 13:23:18 -05:00
Eric Normand
1625842d80 Whitespace 2025-09-25 13:21:02 -05:00
Eric Normand
9af2a858cb Export databases. 2025-09-25 13:19:18 -05:00
Eric Normand
942fcbd2d0 Remove prints 2025-09-25 13:17:56 -05:00
Timothy Dean
67566c475b m. 2025-09-24 17:58:23 -06:00
Timothy Dean
e1bf8c6582 Basic database export functionality 2025-09-24 17:56:06 -06:00
Timothy Dean
069d773c94 Make collection-8 test_resources dir mirroring /collection/8-serialization-v0 2025-09-24 15:47:25 -06:00
Eric Normand
82029ecfbb We're not ready for import-export 2025-09-24 14:26:24 -05:00
Riley Thompson
7070fac7a6 add frontend 2025-09-24 14:15:42 -04:00
Timothy Dean
2653b9d303 Merge remote-tracking branch 'origin/master' into representations 2025-09-24 11:39:14 -06:00
Riley Thompson
addf6fda01 export and import collection representation endpoints 2025-09-24 13:00:51 -04:00
Timothy Dean
4a2651851b representations.core: remove unnecessary decoder code 2025-09-24 10:34:09 -06:00
Timothy Dean
2f80bab68f Fix transform schema 2025-09-24 10:21:03 -06:00
Timothy Dean
a136a66af7 Just delete run-trigger 2025-09-23 17:02:05 -06:00
Timothy Dean
aab38f089a Transform improvements 2025-09-23 16:51:09 -06:00
Eric Normand
8dd1b8c4cc import/export tests for questions 2025-09-23 16:02:37 -05:00
Eric Normand
d8e3b30a83 Add transforms export 2025-09-23 14:35:42 -05:00
Eric Normand
6b9a0c0277 Add roundtrip tests 2025-09-23 14:31:12 -05:00
Timothy Dean
774cc91a4e Transforms schema tweaks, ingestion. Persist method not well tested 2025-09-23 10:22:30 -06:00
Eric Normand
0d185aa777 Export metrics 2025-09-23 10:10:22 -05:00
Eric Normand
4434205bc0 Add model test 2025-09-23 09:34:19 -05:00
Timothy Dean
9fc8a2724d Add validate-representation script 2025-09-22 14:05:04 -06:00
Timothy Dean
94a5098f74 Add load-representation script 2025-09-22 13:44:14 -06:00
Timothy Dean
5c788efbe1 Questions and models from serialization-v0 collection 2025-09-22 12:47:58 -06:00
Eric Normand
dc9bbc95d5 More question tests 2025-09-22 11:39:47 -05:00
Eric Normand
29e408bf72 Merge branch 'master' into representations 2025-09-22 10:06:21 -05:00
Timothy Dean
9398a2f092 Push experimental model yml file 2025-09-20 01:45:06 -05:00
Timothy Dean
bed66ab743 Fix yarn dev 2025-09-20 01:39:08 -05:00
Timothy Dean
ed931e2404 Playing with model metadata 2025-09-20 01:38:13 -05:00
Timothy Dean
afa3d6d70c Fix the /load endpoint 2025-09-20 01:37:15 -05:00
dan sutton
d616d269f9 fixup tests
need db to run db tests. and validation checks against schema
2025-09-19 17:36:31 -05:00
Eric Normand
ea1ef9c283 Comment 2025-09-19 16:57:54 -05:00
Eric Normand
639fcf2a3e Add question tests 2025-09-19 16:54:31 -05:00
dan sutton
89bf939860 referencing questions in static assets
```
❯ tree /tmp/behold
/tmp/behold
├── c-1-card196164.card.yml
├── c-2-card196324.card.yml
├── sub-collection
│   └── c-3-card12345.card.yml
└── with-references
    ├── question-122.yml
    └── question-125.yml

3 directories, 5 files
```

the with-references directory is as follows:

```yaml
name: kondo_lints_question
type: question
ref: question-122
mbql_query:
  type: query
  database: pg
  query:
    source-table:
    - pg
    - public
    - kondo_lints
    fields:
    - - field
      - - pg
        - public
        - kondo_lints
        - id
      - base-type: type/Integer
    - - field
      - - pg
        - public
        - kondo_lints
        - filename
      - base-type: type/Text
    - - field
      - - pg
        - public
        - kondo_lints
        - line
      - base-type: type/Integer
    - - field
      - - pg
        - public
        - kondo_lints
        - status
      - base-type: type/Text
    - - field
      - - pg
        - public
        - kondo_lints
        - error
      - base-type: type/Text
    - - field
      - - pg
        - public
        - kondo_lints
        - category
      - base-type: type/Text
database: pg
```

and 125:

```yaml
name: kondo_lints_question, Filtered by Status is error
type: question
ref: question-125
mbql_query:
  database: pg
  type: query
  query:
    source-table:
      ref: question-122
    filter:
    - =
    - - field
      - status
      - base-type: type/Text
    - error
database: pg
```

It _references_ another static, non-app-db question

```clojure
core=> (:dataset_query (fetch :question -5))
{:database 3,
 :type "query",
 :query {:source-table "card__-4", ;; <----- card -4
         :filter ["="
                  ["field" "status" {:base-type "type/Text"}]
                  "error"]}}
core=> (->> (qp/process-query (:dataset_query (fetch :question -5)))
            :data :rows (take 2))
([12933
  "shared/src/metabase/mbql/normalize.cljc"
  594
  "error"
  "Recur can only be used in tail position."
  "shared/src/metabase/mbql/normalize.cljc"]
 [12934
  "shared/src/metabase/mbql/normalize.cljc"
  594
  "error"
  "Unresolved symbol"
  "shared/src/metabase/mbql/normalize.cljc"])
```
2025-09-19 16:38:05 -05:00
Eric Normand
c635152b92 Fixes 2025-09-19 15:50:30 -05:00
Eric Normand
7e8d562358 Move export functions 2025-09-19 14:25:21 -05:00
Eric Normand
320aab30bc whitespace 2025-09-19 14:25:16 -05:00
Eric Normand
968cf8c336 Add a tiny test 2025-09-19 13:37:15 -05:00
Eric Normand
f4f22cb733 Revert all disablings 2025-09-19 13:33:30 -05:00
Timothy Dean
48239abdd3 Add an MBQL model.yml file 2025-09-19 12:24:33 -06:00
Eric Normand
2c40e5f217 kick ci 2025-09-19 13:22:56 -05:00
Eric Normand
38550465eb disable frontend tests? 2025-09-19 13:20:19 -05:00
Eric Normand
8f73866c87 Disable frontend tests? 2025-09-19 13:19:20 -05:00
Eric Normand
d1625d7384 Skip frontend? 2025-09-19 13:18:11 -05:00
Eric Normand
e22c93ed4c try skip 2025-09-19 13:11:23 -05:00
Eric Normand
a229d08410 remove stuff from run-tests.yml 2025-09-19 13:07:49 -05:00
Eric Normand
35aec6c7cb Revert "Delete e2e tests files"
This reverts commit 58c4abdd10.
2025-09-19 13:05:51 -05:00
Eric Normand
58c4abdd10 Delete e2e tests files 2025-09-19 13:04:02 -05:00
Eric Normand
08e9272440 Get representation tests to run???? 2025-09-19 12:51:38 -05:00
Eric Normand
5c9303e6e3 Attempt to disable tests 2025-09-19 12:49:47 -05:00
Eric Normand
554c6388b3 Remove more tests 2025-09-19 12:41:13 -05:00
Eric Normand
f21d0de52e Disable backend test runs 2025-09-19 12:11:19 -05:00
Eric Normand
8dc61e4eb0 Disable more tests 2025-09-19 12:08:10 -05:00
Timothy Dean
270fcf4299 Reorganize code again based on huddle discussion 2025-09-19 11:06:43 -06:00
Eric Normand
77cfe40954 kick ci 2025-09-19 11:58:19 -05:00
Eric Normand
6c4f743f38 Attempt: Disable driver tests and add representation tests runner 2025-09-19 11:56:39 -05:00
Eric Normand
65a5a67624 wip 2025-09-19 11:06:15 -05:00
Timothy Dean
abaac8c3f7 m. Rename 2025-09-19 09:20:07 -06:00
Timothy Dean
e1406025a9 Provide a wrapper for yaml->toucan operations 2025-09-19 09:18:41 -06:00
dan sutton
3312f915ee Static serving
given

```
❯ tree /tmp/swaperoo
/tmp/swaperoo
├── c-1-card196164.card.yml
├── c-2-card196324.card.yml
└── sub-collection
    └── c-3-card12345.card.yml

2 directories, 3 files
```

the running

```
clj -M:dev:ee:ee-dev:drivers:drivers-dev:socket -m metabase.core.bootstrap static --directory /tmp/swaperoo
```

Will serve the assets from /tmp/swaperoo.
It does this by loading them in MEMORY and assigning them sequential
negative ids. These are not loaded into the app-db.

```
❯ tree /tmp/swaperoo
/tmp/swaperoo  (collection -1: swaperoo)
├── c-1-card196164.card.yml (card -1)
├── c-2-card196324.card.yml (card -2)
└── sub-collection (collection -2: sub-collection)
    └── c-3-card12345.card.yml (card -3)

```
2025-09-19 09:32:02 -05:00
Timothy Dean
3809c909f0 Create an invalid example yml file 2025-09-18 16:44:09 -06:00
Timothy Dean
388f208bb2 Tweak model.yml 2025-09-18 16:28:12 -06:00
Eric Normand
55ef1e8392 card->question 2025-09-18 17:14:56 -05:00
Eric Normand
576535eaf7 dataset->model 2025-09-18 17:09:20 -05:00
Timothy Dean
78e3b5d282 Wire up model ingestion 2025-09-18 15:50:51 -06:00
Timothy Dean
ff96dabfcf Slightly improved /validate endpoint 2025-09-18 15:35:02 -06:00
Timothy Dean
3dece4143a WIP model ingestion, not wired up yet 2025-09-18 15:28:52 -06:00
Eric Normand
092674a6b8 string instead of keyword 2025-09-18 16:22:21 -05:00
dan sutton
4d46a3beb4 clean up representation -> card in memory representation 2025-09-18 16:21:33 -05:00
Eric Normand
edccda93bf Add bb script to export a collection 2025-09-18 16:18:05 -05:00
Timothy Dean
2d10da8267 Stop hardcoding :native on question ingestion 2025-09-18 15:11:16 -06:00
Timothy Dean
64d22caf90 Move creator-id and entity-id determination into representation->question-data 2025-09-18 15:00:24 -06:00
Eric Normand
c09d983f2c Add collection endpoint 2025-09-18 15:50:49 -05:00
Eric Normand
503c35172d Merge branch 'master' into representations 2025-09-18 15:02:12 -05:00
Eric Normand
57906d9ddc kick ci 2025-09-18 14:59:28 -05:00
Eric Normand
0e2fdcdfef Merge branch 'representations' of github.com:metabase/metabase into representations 2025-09-18 13:55:55 -05:00
Eric Normand
83f6814775 kick ci 2025-09-18 13:55:37 -05:00
Timothy Dean
1bb21b1ad7 Add /validate endpoint to API 2025-09-18 11:46:51 -06:00
Timothy Dean
fb62d65095 m. 2025-09-18 11:37:10 -06:00
Timothy Dean
ad1423767a Better example model.yml 2025-09-18 11:36:14 -06:00
Timothy Dean
ef661cc1d1 Add example model yml with some schema 2025-09-18 11:29:51 -06:00
Timothy Dean
be445608ce Create representations.ingestion.common 2025-09-18 11:23:48 -06:00
Eric Normand
075ee44a6c Forgot this file 2025-09-18 12:05:25 -05:00
Eric Normand
407e6dd824 Export models
Note: I copied the export for questions, including the logic and schema. I don't know if there's something else in
models (metadata?) that I am not capturing.
2025-09-18 12:04:35 -05:00
Eric Normand
5b86da8b8b Export mbql questions 2025-09-18 11:01:06 -05:00
Eric Normand
39d9982ae4 API for exporting a native query question.
GET /api/ee/representation/question/92
2025-09-18 10:38:10 -05:00
Timothy Dean
530b985bc4 tweak commented out dev utils 2025-09-17 17:35:24 -06:00
Timothy Dean
ab8afe34b1 Delete 'card' as a named entity, reorganize namespaces as cleanup 2025-09-17 17:31:45 -06:00
Eric Normand
26b4d85352 API route
curl -X POST -H "Content-Type: text/yaml" -H "X-API-Key: mb_5Qj3t1s5NYcXNq1jB3wIebP3rAhLcmmgkSBp8YTvXOU=" --data-binary @test_resources/representations/v0/monthly-revenue.question.yml localhost:3002/api/ee/representation/load/5
2025-09-17 17:30:44 -05:00
Timothy Dean
558a2f91b2 On card ingestion, update existing card if ref matches 2025-09-17 16:24:56 -06:00
Timothy Dean
6b9381b859 Tweak collection schema 2025-09-17 16:15:48 -06:00
Timothy Dean
0cfa725615 Hook up card ingestion 2025-09-17 15:50:36 -06:00
Timothy Dean
7d74867058 Ingest one example question.yml file and insert it into the app-db 2025-09-17 15:42:20 -06:00
Timothy Dean
bf3a3e9e00 WIP: ingest & validate yml against schemas 2025-09-17 12:30:48 -06:00
dan sutton
bcca5c2329 first pass at writing representations
Interesting things:
- using serdes mbql export. this puts nano-ids, so we walk over each card, get mapping of nano-id to id, then replace
with refs. So the ingestion will need to do the opposite.

  ;; do we like entity type in filename?
  ;; walk over all, identity which depend on other refs. so first, get all refs
  ;; then walk over each dataset_query, looking for any refs that are reffed
  ;; then do topological sort, inserting cards without deps and keeping a map of ref to inserted id
  ;; update existing refs to ids (note source-tables are "card__<id>"
  ;; insert and continue

```clojure
core=> (write-em "/tmp" 8)
.
..nil
```

Very dump to write dots but this is exploratory, baby.

example:

(note, rows in yaml are actually commented out but git would remove them)
```yaml
❯ tree custom
custom
├── c-115-card1150883.card.yml
├── c-116-card1151398.card.yml
└── c-117-card1150868.card.yml

1 directory, 3 files

/tmp on ☁️  metabase-query
❯ cat custom/*
name: Orders and weird column
version: 1-card
type: card
ref: c-115-card1150883
dataset_query:
  database: Sample Database
  type: query
  query:
    source-table:
    - Sample Database
    - PUBLIC
    - ORDERS
    expressions:
      sum-of-weird:
      - +
      - - field
        - - Sample Database
          - PUBLIC
          - ORDERS
          - TAX
        - base-type: type/Float
      - - field
        - - Sample Database
          - PUBLIC
          - ORDERS
          - TOTAL
        - base-type: type/Float

 [1 1 14 37.648145389078365 2.07 39.718145389078366 nil "2025-02-11T21:40:27.892Z" 2 41.788145389078366 "Hudson Borer" "Awesome Concrete Shoes"]
 [2 1 123 110.93145648834248 6.1 117.03145648834247 nil "2024-05-15T08:04:04.58Z" 3 123.13145648834247 "Hudson Borer" "Mediocre Wooden Bench"]
 [3 1 105 52.723521442619514 2.9 49.206842233769756 6.416679208849759 "2025-12-06T22:22:48.544Z" 2 52.106842233769754 "Hudson Borer" "Fantastic Wool Shirt"]
 [4 1 94 109.21864156655383 6.01 115.22864156655383 nil "2025-08-22T16:30:42.392Z" 6 121.23864156655384 "Hudson Borer" "Awesome Bronze Plate"]
 [5 1 132 127.88197029833711 7.03 134.9119702983371 nil "2024-10-10T03:34:47.309Z" 5 141.9419702983371 "Hudson Borer" "Sleek Steel Table"]
 [6 1 60 29.80214751859149 1.64 31.44214751859149 nil "2025-11-06T16:38:50.134Z" 3 33.08214751859149 "Hudson Borer" "Rustic Paper Car"]
 [7 1 55 95.77128575934437 5.27 101.04128575934436 nil "2024-09-11T11:22:26.521Z" 5 106.31128575934436 "Hudson Borer" "Mediocre Rubber Shoes"]
 [8 1 65 68.22769726470014 3.75 63.32374433449318 8.653952930206964 "2025-06-17T02:37:41.693Z" 7 67.07374433449317 "Hudson Borer" "Ergonomic Silk Table"]
 [9 1 184 77.3982748679465 4.26 78.06353271268733 3.594742155259162 "2023-05-03T16:00:54.923Z" 3 82.32353271268734 "Hudson Borer" "Practical Granite Plate"]
 [10 1 6 97.43621265344382 5.36 102.79621265344382 nil "2026-01-17T01:44:37.233Z" 2 108.15621265344382 "Hudson Borer" "Small Marble Hat"]
name: Orders and weird column, Filtered by sum-of-weird is greater than 10
version: 1-card
type: card
ref: c-116-card1151398
dataset_query:
  database: Sample Database
  type: query
  query:
    source-table: c-115-card1150883
    filter:
    - '>'
    - - field
      - sum-of-weird
      - base-type: type/Float
    - 10

 [1 1 14 37.648145389078365 2.07 39.718145389078366 nil "2025-02-11T21:40:27.892Z" 2 41.788145389078366 "Hudson Borer" "Awesome Concrete Shoes"]
 [2 1 123 110.93145648834248 6.1 117.03145648834247 nil "2024-05-15T08:04:04.58Z" 3 123.13145648834247 "Hudson Borer" "Mediocre Wooden Bench"]
 [3 1 105 52.723521442619514 2.9 49.206842233769756 6.416679208849759 "2025-12-06T22:22:48.544Z" 2 52.106842233769754 "Hudson Borer" "Fantastic Wool Shirt"]
 [4 1 94 109.21864156655383 6.01 115.22864156655383 nil "2025-08-22T16:30:42.392Z" 6 121.23864156655384 "Hudson Borer" "Awesome Bronze Plate"]
 [5 1 132 127.88197029833711 7.03 134.9119702983371 nil "2024-10-10T03:34:47.309Z" 5 141.9419702983371 "Hudson Borer" "Sleek Steel Table"]
 [6 1 60 29.80214751859149 1.64 31.44214751859149 nil "2025-11-06T16:38:50.134Z" 3 33.08214751859149 "Hudson Borer" "Rustic Paper Car"]
 [7 1 55 95.77128575934437 5.27 101.04128575934436 nil "2024-09-11T11:22:26.521Z" 5 106.31128575934436 "Hudson Borer" "Mediocre Rubber Shoes"]
 [8 1 65 68.22769726470014 3.75 63.32374433449318 8.653952930206964 "2025-06-17T02:37:41.693Z" 7 67.07374433449317 "Hudson Borer" "Ergonomic Silk Table"]
 [9 1 184 77.3982748679465 4.26 78.06353271268733 3.594742155259162 "2023-05-03T16:00:54.923Z" 3 82.32353271268734 "Hudson Borer" "Practical Granite Plate"]
 [10 1 6 97.43621265344382 5.36 102.79621265344382 nil "2026-01-17T01:44:37.233Z" 2 108.15621265344382 "Hudson Borer" "Small Marble Hat"]
name: 5 products
version: 1-card
type: card
ref: c-117-card1150868
dataset_query:
  database: Sample Database
  type: native
  native:
    template-tags:
      category_filter:
        widget-type: string/=
        display-name: Category Filter
        type: dimension
        name: category_filter
        id: b5cca8e2-d397-4195-9957-1f69fda66d95
        dimension:
        - field
        - - Sample Database
          - PUBLIC
          - PRODUCTS
          - CATEGORY
        - null
    query: select * from products where {{category_filter}} limit 5

 [1 "1018947080336" "Rustic Paper Wallet" "Gizmo" "Swaniawski, Casper and Hilll" 29.463261130679875 4.6 "2023-07-19T19:44:56.582Z"]
 [2 "7663515285824" "Small Marble Shoes" "Doohickey" "Balistreri-Ankunding" 70.07989613071763 0.0 "2025-04-11T08:49:35.932Z"]
 [3 "4966277046676" "Synergistic Granite Chair" "Doohickey" "Murray, Watsica and Wunsch" 35.388744881539054 4.0 "2024-09-08T22:03:20.239Z"]
 [4 "4134502155718" "Enormous Aluminum Shirt" "Doohickey" "Regan Bradtke and Sons" 73.99178100854834 3.0 "2024-03-06T02:53:09.937Z"]
 [5 "5499736705597" "Enormous Marble Wallet" "Gadget" "Price, Schultz and Daniel" 82.7450976850356 4.0 "2022-10-03T01:47:39.147Z"]
```
2025-09-16 16:49:54 -05:00
Timothy Dean
25c142a7aa v0 scaffolding collection.yml 2025-09-16 15:43:43 -06:00
Timothy Dean
2d53706de7 v0 database scaffolding 2025-09-16 15:36:14 -06:00
Timothy Dean
ae6f82e0ee Scaffolding: clj schemas 2025-09-16 15:16:19 -06:00
Timothy Dean
219685e26f Scaffolding 2025-09-16 15:01:02 -06:00
Timothy Dean
1f892946c9 Scaffolding 2025-09-16 14:53:43 -06:00
Timothy Dean
cdacf75b02 Init commit 2025-09-16 13:59:53 -06:00
1853 changed files with 32588 additions and 18251 deletions

View File

@@ -273,6 +273,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"}
@@ -489,7 +490,6 @@
metabase.util.malli/fn schema.core/fn
metabase.util.namespaces/import-fns potemkin/import-vars
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
@@ -566,6 +566,7 @@
metabase.public-sharing.api-test/with-required-param-card! hooks.common/with-one-binding
metabase.public-sharing.api-test/with-temp-public-card hooks.common/let-one-with-optional-value
metabase.public-sharing.api-test/with-temp-public-dashboard hooks.common/let-one-with-optional-value
metabase.public-sharing.api-test/with-temp-public-document hooks.common/let-one-with-optional-value
metabase.public-sharing.api-test/with-temp-public-dashboard-and-card hooks.common/with-three-bindings
metabase.pulse.api.alert-test/with-alert-in-collection! hooks.common/with-four-bindings
metabase.pulse.dashboard-subscription-test/with-link-card-fixture-for-dashboard hooks.common/let-second
@@ -573,8 +574,8 @@
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
@@ -688,7 +689,6 @@
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

View File

@@ -62,6 +62,7 @@
lib-be
model-persistence
models
parameters
permissions
public-sharing
queries
@@ -317,7 +318,7 @@
app-db
classloader
config
legacy-mbql
models
query-processor
search
@@ -335,10 +336,8 @@
app-db
audit-app
config
driver
eid-translation
events
legacy-mbql
lib-be
models
notification
@@ -366,10 +365,8 @@
content-translation
{:team "UX West"
:api #{metabase.content-translation.api
metabase.content-translation.models}
:uses #{api
premium-features
:api #{metabase.content-translation.models}
:uses #{premium-features
util}}
content-verification
@@ -393,7 +390,8 @@
metabase.dashboards.init
metabase.dashboards.models.dashboard
metabase.dashboards.models.dashboard-card
metabase.dashboards.models.dashboard-tab}
metabase.dashboards.models.dashboard-tab
metabase.dashboards.schema}
:uses #{actions
analytics
api
@@ -428,20 +426,12 @@
:api #{metabase.database-routing.core}
:uses #{premium-features}}
dependencies
{:team "Querying"
:api #{metabase.premium-features.core}
:uses #{premium-features}}
driver
{:team "Drivers"
:api #{metabase.driver
metabase.driver.common
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.driver.ddl.interface
metabase.driver.h2
metabase.driver.impl
@@ -455,22 +445,34 @@
metabase.driver.sql-jdbc.execute.diagnostic
metabase.driver.sql-jdbc.sync
metabase.driver.sql.query-processor
metabase.driver.sql.query-processor.deprecated
metabase.driver.sql.util
metabase.driver.sync
metabase.driver.util}
:uses #{driver-api
util}}
:uses #{app-db
appearance
auth-provider
classloader
config
driver-api
events
legacy-mbql
lib
lib-be
premium-features
query-processor
settings
system
util
warehouse-schema
warehouses}}
driver-api
{:team "Drivers"
:api #{metabase.driver-api.core
metabase.driver-api.init}
:api #{metabase.driver-api.core}
:uses #{actions
api
app-db
appearance
auth-provider
classloader
config
connection-pool
@@ -489,8 +491,7 @@
system
upload
util
warehouse-schema
warehouses}}
warehouse-schema}}
eid-translation
{:team "UX West"
@@ -512,7 +513,7 @@
:uses #{analytics
api
config
driver
dashboards
eid-translation
events
models
@@ -541,7 +542,6 @@
:uses #{appearance
models
query-processor
system
types
util}}
@@ -591,7 +591,6 @@
legacy-mbql
{:team "Querying"
:api #{metabase.legacy-mbql.normalize
metabase.legacy-mbql.predicates
metabase.legacy-mbql.schema
metabase.legacy-mbql.util}
:uses #{lib
@@ -619,7 +618,6 @@
metabase.lib.metadata.result-metadata
metabase.lib.normalize
metabase.lib.options
metabase.lib.parse
metabase.lib.query
metabase.lib.schema
metabase.lib.schema.actions
@@ -657,8 +655,7 @@
lib-be
{:team "Querying"
:api #{metabase.lib-be.core
metabase.lib-be.init
metabase.lib-be.metadata.jvm}
metabase.lib-be.init}
:uses #{lib
models
settings
@@ -725,7 +722,6 @@
classloader
legacy-mbql
lib
lib-be
settings
util}}
@@ -776,6 +772,7 @@
parameters
{:team "Querying"
:api #{metabase.parameters.chain-filter
metabase.parameters.core
metabase.parameters.custom-values
metabase.parameters.dashboard
metabase.parameters.field
@@ -786,13 +783,11 @@
:uses #{api
app-db
classloader
driver
legacy-mbql
lib
lib-be
models
query-processor
types
util
warehouse-schema
warehouses}}
@@ -870,7 +865,6 @@
dashboards
events
lib
lib-be
models
parameters
queries
@@ -878,7 +872,8 @@
request
settings
tiles
util}}
util
enterprise/documents}}
pulse
{:team "Workflows"
@@ -893,6 +888,7 @@
config
driver
events
lib
models
notification
permissions
@@ -905,19 +901,6 @@
enterprise/advanced-permissions
enterprise/sandbox}}
python-runner
{:team "Workflows"
:api #{metabase.python-runner.api
metabase.python-runner.core
metabase.python-runner.init}
:uses #{api
driver
models
query-processor
request
util
enterprise/transforms}}
queries
{:team "Querying"
:api #{metabase.queries.api
@@ -985,10 +968,10 @@
metabase.query-processor.middleware.annotate
metabase.query-processor.middleware.cache-backend.db
metabase.query-processor.middleware.constraints
metabase.query-processor.middleware.fetch-source-query-legacy
metabase.query-processor.middleware.limit
metabase.query-processor.middleware.permissions
metabase.query-processor.middleware.wrap-value-literals
metabase.query-processor.parameters.dates
metabase.query-processor.parameters.operators
metabase.query-processor.pipeline
metabase.query-processor.pivot
@@ -1017,6 +1000,7 @@
batch-processing
cache
config
dashboards
driver
events
formatter
@@ -1031,11 +1015,9 @@
premium-features
queries
query-permissions
request
server
settings
system
types
users
util}}
@@ -1095,12 +1077,14 @@
audit-app
collections
config
driver
events
lib
lib-be
models
permissions
premium-features
queries
query-processor
request
settings
startup
@@ -1143,6 +1127,7 @@
core
driver
embedding
lib-be
premium-features
query-processor
request
@@ -1198,10 +1183,8 @@
api
app-db
appearance
channel
config
events
permissions
request
session
settings
@@ -1307,6 +1290,9 @@
metabase.tiles.init}
:uses #{api
legacy-mbql
lib
lib-be
parameters
query-processor
settings
util}}
@@ -1512,7 +1498,6 @@
enterprise/action-v2
{:team "Workflows"
:api #{metabase-enterprise.action-v2.api
metabase-enterprise.action-v2.core
metabase-enterprise.action-v2.init}
:uses #{actions
api
@@ -1547,7 +1532,6 @@
metabase-enterprise.advanced-permissions.common
metabase-enterprise.advanced-permissions.models.permissions.group-manager}
:uses #{api
legacy-mbql
lib
permissions
premium-features
@@ -1578,7 +1562,6 @@
:api #{metabase-enterprise.ai-sql-generation.api}
:uses #{api
driver
models
util
enterprise/metabot-v3}}
@@ -1633,6 +1616,11 @@
:uses #{api
premium-features util}}
enterprise/bookmarks
{:team "UX West"
:api #{}
:uses #{}}
enterprise/cache
{:team "UX West"
:api #{metabase-enterprise.cache.init}
@@ -1655,7 +1643,8 @@
{:team "Workflows"
:api #{metabase-enterprise.comments.api
metabase-enterprise.comments.init}
:uses #{api
:uses #{analytics
api
channel
events
models
@@ -1665,8 +1654,7 @@
enterprise/content-translation
{:team "UX West"
:api #{metabase-enterprise.content-translation.dictionary
metabase-enterprise.content-translation.routes}
:api #{metabase-enterprise.content-translation.routes}
:uses #{api
content-translation
embedding
@@ -1692,20 +1680,11 @@
:api #{}
:uses #{premium-features}}
enterprise/data-editing
{:team "Workflows"
:api #{metabase-enterprise.data-editing.api}
:uses #{actions
api
models
util}}
enterprise/database-replication
{:team "Cloud"
:api #{metabase-enterprise.database-replication.api
metabase-enterprise.database-replication.init}
:uses #{analytics
api
:uses #{api
driver
premium-features
settings
@@ -1732,11 +1711,10 @@
enterprise/dependencies
{:team "Querying"
:api #{metabase-enterprise.dependencies.api
metabase-enterprise.dependencies.core
#_metabase-enterprise.dependencies.core
metabase-enterprise.dependencies.init}
:uses #{analyze
api
app-db
collections
config
driver
@@ -1749,6 +1727,7 @@
premium-features
queries
query-processor
settings
task
util}}
@@ -1756,7 +1735,8 @@
{:team "UX West"
:api #{metabase-enterprise.documents.api
metabase-enterprise.documents.core
metabase-enterprise.documents.init}
metabase-enterprise.documents.init
metabase-enterprise.documents.prose-mirror}
:uses #{activity-feed
api
app-db
@@ -1764,13 +1744,12 @@
collections
events
models
permissions
premium-features
public-sharing
queries
query-permissions
revisions
search
users
util
view-log}}
@@ -1792,7 +1771,6 @@
audit-app
embedding
premium-features
util
enterprise/sso}}
enterprise/gsheets
@@ -1855,6 +1833,7 @@
metabase-enterprise.metabot-v3.tools.api}
:uses #{api
app-db
audit-app
collections
config
driver
@@ -1896,6 +1875,19 @@
:uses #{premium-features
util}}
enterprise/representations
{:team "Querying"
:api #{metabase-enterprise.representations.core
metabase-enterprise.representations.api
metabase-enterprise.representations.init}
:uses #{api
collections
config
driver
lib
models
util}}
enterprise/sandbox
{:team "UX West"
:api #{metabase-enterprise.sandbox.api.routes
@@ -1903,14 +1895,12 @@
:uses #{api
app-db
audit-app
classloader
driver
legacy-mbql
lib
models
permissions
premium-features
query-permissions
query-processor
request
users
@@ -1973,18 +1963,13 @@
app-db
appearance
collections
config
legacy-mbql
lib
logger
models
plugins
premium-features
search
settings
setup
util
warehouse-schema}}
util}}
enterprise/snippet-collections
{:team "Querying"
@@ -2012,7 +1997,6 @@
settings
sso
system
users
util
enterprise/scim}}
@@ -2040,13 +2024,11 @@
:uses #{analytics
api
app-db
config
driver
events
lib
lib-be
models
permissions
premium-features
query-processor
request
@@ -2054,7 +2036,6 @@
sync
task
task-history
upload
util
enterprise/transforms-python}}
@@ -2062,13 +2043,11 @@
{:team "Querying"
:api #{metabase-enterprise.transforms-python.api
metabase-enterprise.transforms-python.execute
metabase-enterprise.transforms-python.init
metabase-enterprise.transforms-python.settings}
metabase-enterprise.transforms-python.init}
:uses #{api
app-db
config
driver
models
query-processor
settings
util

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

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

@@ -163,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]]
@@ -179,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]]

View File

@@ -21,7 +21,6 @@ const collectAndAverageTimings = async ({
const timingData = await downloadAndExtractArtifacts(
artifacts,
token,
github,
context,
);

25
.github/team.json vendored
View File

@@ -36,14 +36,10 @@
"name": "Workflows",
"label": ".Team/Workflows",
"members": [
"qnkhuat",
"piranha",
"crisptrutski",
"spalt08",
"stasgavrylov",
"uladzimirdev",
"kulyk",
"kamilmielnik"
"kulyk"
]
},
{
@@ -70,10 +66,8 @@
"retro",
"sloansparger",
"somtom",
"wotbrew",
"tsplude",
"lbrdnk",
"bronsa"
"lbrdnk"
]
},
{
@@ -81,7 +75,6 @@
"label": ".Team/ProductGrowth",
"members": [
"nemanjaglumac",
"chodorowicz",
"andsalves"
]
},
@@ -113,6 +106,20 @@
"alxnddr",
"bpander"
]
},
{
"name": "Gadget",
"label": ".Team/Gadget",
"members": [
"nmezzopera",
"bronsa",
"wotbrew",
"qnkhuat",
"chodorowicz",
"kamilmielnik",
"stasgavrylov",
"uladzimirdev"
]
}
]
}

View File

@@ -255,12 +255,6 @@ jobs:
env:
enable-ssl-tests: 'true'
job:
- name: Driver Tests
build-static-viz: false
test-args: >-
:only-tags [:mb/driver-tests]
:exclude-tags [:mb/transforms-python-test]
exclude-tag: ':mb/transforms-python-test'
- name: Enterprise Tests
build-static-viz: false
test-args: >-

View File

@@ -51,11 +51,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 +65,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 +73,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 +81,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"]'
@@ -157,7 +162,7 @@ jobs:
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

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

@@ -0,0 +1,96 @@
name: "Claude Code Review"
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}-claude-code-review
cancel-in-progress: true
env:
EXCLUDED_PR_AUTHORS: '["kamilmielnik", "romeovs"]'
jobs:
review:
if: github.event.pull_request.draft == false && !contains(fromJSON(env.EXCLUDED_PR_AUTHORS), github.event.pull_request.user.login) }}
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,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

@@ -118,7 +118,8 @@ jobs:
const fs = require('fs');
const path = require('path');
const chunkFiles = glob.sync('timing-files/*/chunkTimings.json');
const globber = await glob.create('timing-files/*/chunkTimings.json');
const chunkFiles = await globber.glob();
const specs = new Map();
chunkFiles.forEach(file => {

28
.github/workflows/representations.yml vendored Normal file
View File

@@ -0,0 +1,28 @@
name: Representation Tests
on:
push:
pull_request:
workflow_call:
inputs:
skip:
type: boolean
default: false
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}-backend
cancel-in-progress: true
jobs:
representation-tests:
timeout-minutes: 10
name: Representation Tests
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: 'representation-tests'
- name: Run test
run: clojure -X:dev:ci:test:ee:ee-dev :only '"enterprise/backend/test/metabase_enterprise/representations/"'

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 65 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 64 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 89 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 85 KiB

After

Width:  |  Height:  |  Size: 85 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 75 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 83 KiB

After

Width:  |  Height:  |  Size: 83 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 89 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 78 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 76 KiB

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 109 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 982 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 58 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 212 KiB

After

Width:  |  Height:  |  Size: 212 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 41 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

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