Compare commits

...

392 Commits

Author SHA1 Message Date
Chris Truter
8c6ce9681f Revert "Revert e2e test changes - keep tracking legacy search" 2025-01-23 16:11:51 +02:00
Chris Truter
149a9b1666 Make appdb the default, for e2e tests.
I tried setting the env var in the e2e YAML, but didn't seem to work for CI.
2025-01-23 12:16:33 +02:00
github-automation-metabase
fd887f23f8 Fixes ellipsis button hidden when dash card title is empty string (#52305) (#52501)
* fix unknown attribute error

* fix another error message about unknow HTML attribute

* fix invisible ellipsis when title is empty string

* added e2e test

Co-authored-by: Sébastien <sebastien@metabase.com>
2025-01-22 10:09:34 +00:00
github-automation-metabase
5aeb9b6f83 Fix - Default names for date and number filters are off (#52369) (#52497)
* Update labels

* Revert "Update labels"

This reverts commit be632aec2e.

* Simplify the fix

* Update unit tests

* Update test

* Revert "Simplify the fix"

This reverts commit a9c267c4c0.

* Update labels

* Update test

* Make it work in native editor

* Revert "Update unit tests"

This reverts commit 3614a8ff2f.

* Update test

* Update test

* Update test

* Update test

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-01-22 08:38:20 +00:00
github-automation-metabase
955fa8ad27 Add a repro for #7108 (#52429) (#52498)
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-01-22 08:07:59 +00:00
github-automation-metabase
1c3df30d86 perf: Optimize metabase.formatter/strip-trailing-zeroes (#51774) (#51855)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-01-22 07:50:52 +00:00
github-automation-metabase
13a2547fab docs: Update mysql.md (#52107) (#52228)
* Update mysql.md

Add a note about vitess and planetscale

* Update docs/databases/connections/mysql.md



---------

Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-01-22 07:20:14 +00:00
github-automation-metabase
5a8b6c6c5d Upgrade postgres app db version (#50310) (#52328)
* Upgrade postgres app db version

The more the marrier

* Update docs/installation-and-operation/configuring-application-database.md



---------

Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-01-22 07:19:19 +00:00
github-automation-metabase
ddbc480176 🤖 backported "Static Viz Start of Week in Subscription Emails" (#52168)
* fix conflicts

* Fixing formatting

---------

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-01-21 13:23:19 -08:00
github-automation-metabase
536ace8b9c enterprise only (#52151) (#52459)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-21 20:53:42 +00:00
github-automation-metabase
f7f277fa3a merge conflicts (#52344)
Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-01-21 12:12:29 -08:00
github-automation-metabase
754cf8ed12 fix(sdk): add theme change transition to the root element (#52427) (#52449)
Co-authored-by: Timofey Kachalov <timofei@metabase.com>
2025-01-21 21:16:52 +04:00
github-automation-metabase
986d532280 [db-pool] Retry acquiring the connection one in tests to reduce flakiness (#52360) (#52454)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2025-01-21 16:47:42 +00:00
github-automation-metabase
d1a5765613 Add an order by to the batched truncation (#52417) (#52444)
This is a strange one. But in practice, this was still doing a seq scan
on postgres.

```sql
clean=# explain DELETE FROM query_execution WHERE id IN (SELECT id FROM query_execution WHERE started_at <= '2025-01-02 01:10:15.651839+00' LIMIT 50000);
                                                           QUERY PLAN
--------------------------------------------------------------------------------------------------------------------------------
 Delete on query_execution  (cost=526084.17..1066675.96 rows=0 width=0)
   ->  Nested Loop  (cost=526084.17..1066675.96 rows=50000 width=34)
         ->  Unique  (cost=526076.73..526326.73 rows=50000 width=32)
               ->  Sort  (cost=526076.73..526201.73 rows=50000 width=32)
                     Sort Key: "ANY_subquery".id
                     ->  Subquery Scan on "ANY_subquery"  (cost=0.00..522174.32 rows=50000 width=32)
                           ->  Limit  (cost=0.00..521674.32 rows=50000 width=4)
table scan >>>>>              ->  Seq Scan on query_execution query_execution_1  (cost=0.00..1704153.49 rows=163335 width=4)
                                       Filter: (started_at <= '2025-01-01 19:10:15.651839-06'::timestamp with time zone)
         ->  Bitmap Heap Scan on query_execution  (cost=7.44..11.46 rows=1 width=10)
               Recheck Cond: (id = "ANY_subquery".id)
               ->  Bitmap Index Scan on query_execution_pkey  (cost=0.00..7.44 rows=1 width=0)
                     Index Cond: (id = "ANY_subquery".id)
(13 rows)

```

The odd thing is that it is sensitive to what timestamp you use. Here's
the same query but with a timestamp in 2024:

```sql
clean=# explain DELETE FROM query_execution WHERE id IN (SELECT id FROM query_execution WHERE started_at <= '2024-12-19 01:10:15.651839+00' LIMIT 50000);
                                                             QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------
 Delete on query_execution  (cost=225736.06..641819.90 rows=0 width=0)
   ->  Nested Loop  (cost=225736.06..641819.90 rows=28490 width=34)
         ->  HashAggregate  (cost=225724.95..226009.85 rows=28490 width=32)
               Group Key: "ANY_subquery".id
               ->  Subquery Scan on "ANY_subquery"  (cost=122917.34..225653.72 rows=28490 width=32)
                     ->  Limit  (cost=122917.34..225368.82 rows=28490 width=4)
                           ->  Bitmap Heap Scan on query_execution query_execution_1  (cost=122917.34..225368.82 rows=28490 width=4)
                                 Recheck Cond: (started_at <= '2024-12-18 19:10:15.651839-06'::timestamp with time zone)
                                 ->  Bitmap Index Scan on idx_query_execution_started_at  (cost=0.00..122910.22 rows=28490 width=0)
                                       Index Cond: (started_at <= '2024-12-18 19:10:15.651839-06'::timestamp with time zone)
         ->  Bitmap Heap Scan on query_execution  (cost=11.11..15.12 rows=1 width=10)
               Recheck Cond: (id = "ANY_subquery".id)
               ->  Bitmap Index Scan on query_execution_pkey  (cost=0.00..11.11 rows=1 width=0)
                     Index Cond: (id = "ANY_subquery".id)
(14 rows)
```

And this is because the db engine knows that most of my data is around
2025 and will just hit the whole table rather than hit an index and then
go return most of the table.

The logic we want here is basically, "work up the index on created_at
until we get to a notion of recent".

If we add an order by, we're close to that and things go much faster
again

```sql
clean=# explain DELETE FROM query_execution WHERE id IN (SELECT id FROM query_execution WHERE started_at <= '2025-01-02 01:10:15.651839+00' order by id asc LIMIT 50000);
                                                                         QUERY PLAN
-------------------------------------------------------------------------------------------------------------------------------------------------------------
 Delete on query_execution  (cost=851615.84..1392207.62 rows=0 width=0)
   ->  Nested Loop  (cost=851615.84..1392207.62 rows=50000 width=34)
         ->  Unique  (cost=851608.39..851858.39 rows=50000 width=32)
               ->  Sort  (cost=851608.39..851733.39 rows=50000 width=32)
                     Sort Key: "ANY_subquery".id
                     ->  Subquery Scan on "ANY_subquery"  (cost=0.55..847705.98 rows=50000 width=32)
                           ->  Limit  (cost=0.55..847205.98 rows=50000 width=4)
                                 ->  Index Scan using query_execution_pkey on query_execution query_execution_1  (cost=0.55..2767566.54 rows=163335 width=4)
                                       Filter: (started_at <= '2025-01-01 19:10:15.651839-06'::timestamp with time zone)
         ->  Bitmap Heap Scan on query_execution  (cost=7.44..11.46 rows=1 width=10)
               Recheck Cond: (id = "ANY_subquery".id)
               ->  Bitmap Index Scan on query_execution_pkey  (cost=0.00..7.44 rows=1 width=0)
                     Index Cond: (id = "ANY_subquery".id)
(13 rows)
```

Co-authored-by: dpsutton <dan@dpsutton.com>
2025-01-21 15:56:22 +00:00
github-automation-metabase
84c3067d71 Add overflow auto for dropdown (#52409) (#52437)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-21 15:17:01 +00:00
github-automation-metabase
3c764ab2f4 bump tolerance (#52408) (#52435)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2025-01-21 14:21:45 +00:00
github-automation-metabase
b19cec43b0 🤖 backported "fix(sdk): fix data picker crash by using mantine popover" (#52203)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
fix(sdk): fix data picker crash by using mantine popover (#52096)
2025-01-21 18:33:40 +07:00
github-automation-metabase
2de7e5c735 Improve theme transitions (#52259)
Co-authored-by: Timofey Kachalov <timofei@metabase.com>
2025-01-21 14:39:33 +04:00
github-automation-metabase
c496b8f926 Add wotbrew to team files (#52383) (#52426)
Co-authored-by: Dan Stone <wotbrew@gmail.com>
2025-01-21 09:47:28 +00:00
github-automation-metabase
d127102df9 Sync extra fields to order-by when replacing breakouts (#52338) (#52412)
When we replace a breakout, we also update any related order-by.  However, we weren't updating all fields.  This
meant that the order-by and breakout weren't identical.  This was fine-ish on postgres, because they compiled to the
same thing.  However, on google bigquery, it expects that group bys and order bys will refer to the AS alias instead
of just duplicating the code for the aliased thing.  The differences between order-by and breakout meant that we
didn't realize that the one was supposed to match the other, and so we duplicated the code and bigquery barfed.
Syncing more fields fixes that.

Co-authored-by: William <william@metabase.com>
2025-01-20 22:58:18 +00:00
github-automation-metabase
014f535a11 Fix flex-grow property on ChartSegmentedControl buttons (#52356) (#52410)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-20 22:16:17 +00:00
github-automation-metabase
1a50f174fa Add new strings for v52.7 (#52315) (#52402)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2025-01-20 21:03:05 +00:00
github-automation-metabase
b795acf008 🤖 backported "perf: faster snowflake sync with describe-fields" (#52350)
* perf: faster snowflake sync with describe-fields

Fixes: #49624

* Fix formatting

* Update modules/drivers/snowflake/test/metabase/driver/snowflake_test.clj



* Fix up datetime types

* Ensure describe-fields is sorted

* Fix types for venues

* Check for integer with numeric_scale

* Consistency with getColumnMetadata

* Add pks

---------

Co-authored-by: Case Nelson <case@metabase.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2025-01-20 13:59:16 -07:00
github-automation-metabase
ec748bae87 🤖 backported "Secret handling in details" (#52214)
* Secret handling in details

Secret handling in details was very confusing. This PR consolidates most
of the logic into models.secret around toucan2 lifecycles of
model/Database.

Some of the problems fixed here:
 - path and value confusion. It was possible to swap between uploaded
   files and file-paths and end up with the uploaded file being treated
   as a file-path and leaking to users in logs, APIs, and UIs.
 - Unclear management of secret properties in details. The
   responsibility for taking in secrets in details, saving to a Secret,
   and then ensuring those incoming secrets do not get saved in details
   was spread out all over the place. This made it possible to save a
   secret-value in details.
 - Unclear hydration of secret values for connection testing. How a
   driver was supposed to get a secret and which properties might be in
   details was unclear and inconsistent. Often mangling strings and
   files returned by Secret api was necessary.
 - Encoding problems. Uploaded files were being mangled by taking bytes
   into a string and back to bytes to save. Ensure that the bytes given
   are the bytes saved.

* Fix merge

* Fix tests

* Fix db creation

* Fix db creation in other tests

* Manually add updated_at to database

* Fix tests

* Fix tests

* Fix after-select input

* Wrap in data-uri

* Fallback for -value if base64 encoding failed

* If not data-uri, then just turn string to utf8 bytes

* Poking at oracle failures

* Oracle wrap bytes in data-uri

* Don't clean secret properties from oracle

* Fix base64 typo and add test util for data-uri wrap

* Fix snowflake test

* Another snowflake test

* Update src/metabase/models/secret.clj



* Update src/metabase/models/secret.clj



* Update src/metabase/models/secret.clj



* Update test/metabase/test/util.clj



* Update src/metabase/util/jvm.clj



* Update src/metabase/util/jvm.clj



---------

Co-authored-by: Case Nelson <case@metabase.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2025-01-20 13:28:36 -07:00
github-automation-metabase
13b3f47296 Disable pivot drill thru for multi-stage queries (#52239) (#52335)
This drill thru was recently enabled for multi-stage queries in #51950, but there is a bug which causes the
QueryColumnPicker to fail if a join is present. Disable the drill thru for now while we work on a fix.

Closes #52221
Related to  #52236

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-01-20 18:14:31 +00:00
github-automation-metabase
b5356cc97b proper team for seb (#52326) (#52396)
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-01-20 17:32:43 +00:00
github-automation-metabase
198be6360e fix: correct layout of viz settings on dashboard with reduced motion (#51960) (#52100)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-01-20 16:43:09 +00:00
github-automation-metabase
7f821ff352 fix(sdk): disable dashboard card click behavior and prevent url formatting (#51290) (#52390)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-01-20 16:08:52 +00:00
github-automation-metabase
524c8f817c feat(sdk): granular documentation links in usage problem banner (#52257) (#52386)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-01-20 15:21:29 +00:00
github-automation-metabase
85bc61ff3e Fix error button hover color (#52373) (#52376)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-01-20 13:05:16 +00:00
github-automation-metabase
4085da97da 🤖 backported "Partial rollback of FieldValuesWidget to v50" (#51631)
* Partial rollback of FieldValuesWidget to v50 (#51183)

* Reset FieldValuesWidget to v50 state

* Revert some changes in SingleSelectListField to v50

* Make onSearchChange optional

* Use RowValue instead of string

* Add test-ids to FieldValuesWidget inputs

* Add testing matrix for all parameter combinations

* Add filter matrix test to github workflow

* Fix unit test

* Render custom option value when it exists

* Fix e2e test

* Fix remove value helper

* Fix e2e test

* Render custom label on TokenField

* Update Loki Snapshots

* Use css colors for TokenFieldItem

* Make TokenField dark-mode aware

* Make TokenFieldItem dark-mode aware

* Update Loki Snapshots

* Fix e2e test after merge

* Add listbox role to tokenfield values

* Fix more e2e tests

* Fix e2e test for listbox

* Remove commented out code

* Fix e2e test

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>

* Remove only in e2e test

* Apply H.restore to flaky test

* Update Loki Snapshots

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2025-01-20 14:03:37 +01:00
github-automation-metabase
8c3f31813b Remove stray file that got checked in (#52336) (#52379)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2025-01-20 12:32:52 +00:00
github-automation-metabase
125e856a9e Update static embedding code template for nodejs (#52366) (#52372)
Co-authored-by: Timofey Kachalov <timofei@metabase.com>
2025-01-20 11:18:35 +00:00
github-automation-metabase
9c08bb5b5b Fix empty state color for accordion list (#52308) (#52367)
Co-authored-by: Timofey Kachalov <timofei@metabase.com>
2025-01-20 10:17:49 +00:00
github-automation-metabase
ca8c811fa5 🤖 backported "Repro #46832 - Aggregation picker does not show all columns" (#52362)
* Add repro for #46832 (#52311)

* Remove unwanted code

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-01-20 16:46:49 +07:00
github-automation-metabase
2904410d6f 🤖 backported "Repro #48358 - Incorrect Breakouts Generated for Multi Series Viz When Question is Edited" (#52363)
* Add repro for #48358 (#52313)

* Adjust code to v52

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-01-20 09:38:21 +00:00
github-automation-metabase
84e46f8b52 Fix - Custom Expression error can sometimes be slightly misleading (#52274) (#52364)
* Support multiple operators in expectOp

* Refactor

* Show errors from parser

* Revert recursive-parser changes

* Pass human-friendly operator name to expectOp

* Fix typo

* Require comma if next token is not closing parenthesis

* Add a repro for #15892

* Update existing test

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-01-20 08:26:03 +00:00
github-automation-metabase
eca95f9f88 Fix png image paths when rendered inside Embedding SDK (#52201) (#52361)
Co-authored-by: Timofey Kachalov <timofei@metabase.com>
2025-01-20 07:44:22 +00:00
github-automation-metabase
6d8e4da60e [Databricks] Make dataset loading chunk-size dynamic (#52097) (#52340)
* Make dataset loading chunk-size dynamic

* Update comment

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2025-01-18 11:14:57 +00:00
github-automation-metabase
d817b1d6b5 Update Readme version references and published npm version to 0.52.7 (#52358) 2025-01-18 02:26:57 +00:00
github-automation-metabase
87bbdc199e 🤖 backported "Replace FormFooter default export with named export" (#52355)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-18 02:08:28 +00:00
github-automation-metabase
44457ce71d 🤖 backported "Convert CreateDashboardModal to new components" (#52348)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-17 16:20:02 -08:00
github-automation-metabase
0c28c43481 Change order of input wrapper elements (#52235) (#52330)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-17 16:19:50 -08:00
github-automation-metabase
073f6ed20b no need to reset PR comments on non-PRs (#52352) (#52353)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-01-18 00:10:35 +00:00
github-automation-metabase
32bbf25f25 feat: Add csv_upload_failed metric to Prometheus (#52219) (#52332)
Co-authored-by: Case Nelson <case@metabase.com>
2025-01-17 23:44:25 +00:00
github-automation-metabase
70f581e84c fix(sdk): Add segmented button for chart settings (#52076) (#52233)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-17 15:19:07 -08:00
github-automation-metabase
f5d42c0ed9 Fix bad overflow on ColumnItem preventing showing and hiding columns (#52290) (#52347)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-17 22:39:50 +00:00
github-automation-metabase
7540f257e2 Instant e2e test updates (#51605) (#52346)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-01-17 22:38:45 +00:00
github-automation-metabase
044927fdea docs: linked filters (#52182) (#52343)
* linked filters draft

* linked filters draft

* probably should actually insert the link eh?

* Apply suggestions from code review



* review feedback

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-17 21:23:54 +00:00
github-automation-metabase
8c1a0ce978 docs: sharing icon (#52281) (#52342)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-01-17 21:20:02 +00:00
github-automation-metabase
dd6c1b383c Don't pass locale codes to localeCompare (#52284) (#52337)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2025-01-17 20:44:03 +00:00
github-automation-metabase
8af929eac5 docs - azure sql (#52287) (#52329)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-17 19:06:52 +00:00
github-automation-metabase
5cb2f31949 Return is-null filter in underlying-records drill thru if value is nil (#52295) (#52323)
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-01-17 17:38:20 +00:00
github-automation-metabase
8104261230 docs - env var updates (#51986) (#52283)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-17 14:56:05 +00:00
github-automation-metabase
751091a69c Fixed resetting the embedded preview to the default font (#52306) (#52309)
Co-authored-by: Timofey Kachalov <timofei@metabase.com>
2025-01-17 13:32:38 +00:00
github-automation-metabase
b6b0b59a6e Fix - Custom column formula autocomplete overwrites part of existing formula (#52198) (#52303)
* Add repro for #50925

* Add a test

* Fix the case with whitespace following an incomplete token

* Add test case with bracket identifier following an incomplete token

* Add comments

* Thanks vscode

* Fix the case with bracket identifier following an incomplete token

* Simplify unit tests

* Fix the logic

* Update comment

* Fix it

* Refactor

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-01-17 08:32:33 +00:00
github-automation-metabase
94678090d6 Fix - Confusing error message when trying to add a custom expression aggregation (#52267) (#52301)
* Throw different error when using a known name that is not a metric

* Drop checking for segments as they cannot be used in aggregation expressions anyway

* Add tests

* Remove redundant withName: true

* Wrap with describe

* Make naming consistent

* Improve copy

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-01-17 08:12:28 +00:00
github-automation-metabase
6ff2ac92d0 Add popover props for interactive question dropdowns (#52225) (#52297)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-17 03:07:52 +00:00
github-automation-metabase
e18ec8c425 49809 Fix sorting by unbinned date expression (#52277) (#52292)
Co-authored-by: Eric Normand <ericwnormand@gmail.com>
2025-01-17 00:13:26 +00:00
github-automation-metabase
dcb19b094b Cards use default values when required (#52144) (#52291)
If a card with a default value doesn't actually require a value, letting people clear the default value can be useful.
However, if the card does require a value, letting people clear the default just throws an error.  This is a
completely useless result, so we should use the default value in that case.  See [here](https://metaboat.slack.com/archives/C0645JP1W81/p1719233020129649) for more info.

Co-authored-by: William <william@metabase.com>
2025-01-16 23:35:33 +00:00
github-automation-metabase
ea4d7edd59 Fix SCIM test faliure (#52063) (#52279)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2025-01-16 19:06:09 +00:00
github-automation-metabase
9c291cec8c Fix byte to timestamp coercion for redshift (#52242) (#52278)
use from_varbyte for redshift

Co-authored-by: Riley Thompson <riley@metabase.com>
2025-01-16 18:42:05 +00:00
github-automation-metabase
2128c42178 Dont escape chars of header dashcards (#51880) (#51949)
Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-01-16 18:10:37 +00:00
github-automation-metabase
2935c824b2 revert to using selector instead of helper (#52266) (#52276)
Co-authored-by: Filip Hric <filip@filiphric.sk>
2025-01-16 16:26:44 +00:00
github-automation-metabase
5ddf601f2b Remove unused REPL connection string from Cypress backend (#52272) (#52275)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2025-01-16 16:04:27 +00:00
github-automation-metabase
fead0b0da8 Added Sébastien to team files (#52215) (#52264)
Co-authored-by: Sébastien <sebastien@metabase.com>
2025-01-16 12:34:59 +00:00
github-automation-metabase
e2a6a972d2 🤖 backported "Handle stale search index tracking gracefully for h2" (#52204)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2025-01-16 10:22:53 +00:00
github-automation-metabase
b561470e24 fix(sdk): Standardize SDK components errors with different ID formats (#49714) (#52187)
* [debug] add storybook helper

* Make error on InteractiveQuestion consistent

* Make error on StaticQuestion consistent

* [debug] static question stories

* [debug] InteractiveDashboard Stories

* Make error on InteractiveDashboard consistent

* [debug] StaticDashboard stories

* Make error on StaticDashboard consistent

* [debug] EditableDashboard stories

* Make error on EditableDashboard consistent

* Fix CreateQuestion not working after fixing entity ID states

* Add tests for InteractiveQuestion

* Add StaticQuestion tests

* Add InteractiveDashboard tests

* Add StaticDashboard tests

* Add EditableDashboard tests

* Make variable names consistent

* Extract resource not found error to a component

* Fix missing return

* Make storybook usable and reduce duplications

* Don't roll my own util

* Update error colors following the new design

* Update loki snapshots

* Fix unit test expectation to hex

* Make colors easier to understand with comments

* Update SDK error style

* Update error components copy

* Use Code from metabase/ui

* Remove change accidentally commited

* Fix InteractiveQuestion renders question not found briefly

metabase#51969

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-01-16 09:45:52 +00:00
github-automation-metabase
5e12f48c85 Fix bad wrapping on long names for ColumnItem (#52245) (#52252)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-16 01:46:43 +00:00
github-automation-metabase
3376cedf29 🤖 backported "feat(sdk): Interactive Question Chart Settings Dropdown" (#51971)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-16 01:46:28 +00:00
github-automation-metabase
ded92218fc remove ocean color scheme (#52231) (#52247)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-01-16 00:02:07 +00:00
github-automation-metabase
42545547ba Update setting table name reference to :model/setting (#51783) (#51806)
Update setting table name reference to :model/Setting

Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-01-15 23:44:13 +00:00
github-automation-metabase
e8ebe5eb96 fix(sdk): Ensure that styles within the custom expression editor still work (#51878) (#51982)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-15 14:33:49 -08:00
github-automation-metabase
3a54f9ac5d update troubleshooting (#52031) (#52229)
* Update running.md

Some little details about running Java apps on prod

* Apply suggestions from code review



---------

Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2025-01-15 20:56:17 +00:00
github-automation-metabase
7387d4aedd Apply theme change transition styles to the ParameterFieldSet component (#52049) (#52220)
Co-authored-by: Timofey Kachalov <timofei@metabase.com>
2025-01-15 19:29:13 +00:00
github-automation-metabase
c6c59b6148 🤖 backported "Filter after summarize drill-thru cleanups" (#52212)
* Filter after summarize drill-thru cleanups (#52175)

* Update comment in automatic-insights drill to point to new github issue

* Move helpers from lib.drill-thru.common to lib.underlying

These funcs deal with "underlying" columns, so move them into lib.underlying.

    aggregation-sourced?
    breakout-sourced?
    strictly-underlying-aggregation?

* Consistent naming for drill-thru multi-stage query tests

* Update multi-stage query drills tests to use new test helpers

* Homogenize apis for drill thru test helpers

Rename prepend-filter-to-stage to prepend-filter-to-test-expectation-stage and make the calling interface match
that of append-filter-stage-to-test-expectation.

* cljfmt

* Update compare-aggregations drill for relocated aggregation-sourced?

* Use drill-thru tests helpers in compare-aggregation tests

---------

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-01-15 18:37:13 +00:00
github-automation-metabase
612fce943f quarantine flaky e2e tests (#52213) (#52216)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-01-15 18:11:40 +00:00
github-automation-metabase
ea1383d476 Backport to 52 (#52206)
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2025-01-15 17:32:25 +00:00
Alexander Solovyov
ce274b7e3f [search] fix postgres search index schema (#52192) 2025-01-15 19:03:48 +03:00
github-automation-metabase
eeb6b23040 Add ericnormand to team files (#52143) (#52208)
* Add ericnormand to query team and slack map

* Fix whitespace

* Remove trailing whitespace

Co-authored-by: Eric Normand <ericwnormand@gmail.com>
2025-01-15 15:04:31 +00:00
github-automation-metabase
78dcdb7048 refactor sdk imports (#52020) (#52119)
* move sdk config

* extracts mode: "sdk" to renderWithSDKProviders

* move MetabasePluginsConfig

* move theme types

* move theming stuff

* moved plugins, added eslint rule

* remove duplicated file

* clean up ui.tsx

* move defineMetabaseTheme

* fix lint issue

Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-01-15 10:28:18 +01:00
github-automation-metabase
74b8afc77d Exclude embedding-sdk/dist for babel-loader for Embedding SDK cypress tests (#52127) (#52190)
Co-authored-by: Timofey Kachalov <timofei@metabase.com>
2025-01-15 08:07:15 +00:00
github-automation-metabase
53cd787f14 optimize matrix builder (#52101) (#52191)
Co-authored-by: Filip Hric <filip@filiphric.sk>
2025-01-15 07:52:06 +00:00
github-automation-metabase
23aad0b023 [search] update/delete indexed entities on change (#51222) (#52112) 2025-01-15 10:20:34 +03:00
github-automation-metabase
1a9cb727b9 Update static-embedding.md (#52036) (#52037)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2025-01-15 06:44:32 +00:00
github-automation-metabase
c705839d54 Fix clickhouse uploads (#52181) (#52185)
This change happened in peer
https://github.com/metabase/metabase/pull/51023 and is manifesting now
it seems.

The removal of the call to `(classloader/the-classloader)` is what is
hurting us.

Only clickhouse cloud instances can be set as a suitable upload spot so
i'm doing the following changes in the local jar repro to fix it up:

```clojure
(in-ns 'metabase.driver.clickhouse)

(defmethod driver/database-supports? [:clickhouse :uploads] [_driver _feature db]
  true)

(in-ns 'metabase.public-settings)
(let [db_id 2, schema_name "default", table_prefix "upload_"]
  (t2/update! :model/Database db_id {:uploads_enabled      true
                                     :uploads_schema_name  schema_name
                                     :uploads_table_prefix table_prefix}))
```

Co-authored-by: dpsutton <dan@dpsutton.com>
2025-01-15 05:11:05 +00:00
github-automation-metabase
ee9d83e1b2 Removing error boundaries when log scale y axis contains both negative and positive values (#51941) (#52160)
Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-01-14 23:53:11 +00:00
github-automation-metabase
d8160ceee4 Enabling mouse wheel scroll zooming for leaflet maps (#51888) (#52158)
* Enabling mouse wheel scroll zooming for leaflet maps

* Reducing wheelPxPerZoomLevel so scroll zooming works faster in leaflet maps

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-01-14 23:37:28 +00:00
github-automation-metabase
49b41aeebd perf: Fix performance of CSV pivot table export (#51985) (#52147)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2025-01-14 22:26:12 +00:00
github-automation-metabase
61e6392889 Update mysql.md (#52139) (#52150)
* Update mysql.md

Add an additional flag as a note, since I've hit this one today with a customer

* Update docs/databases/connections/mysql.md



---------

Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-14 22:06:39 +00:00
github-automation-metabase
8da74f2a2c Update activating-the-enterprise-edition.md (#52133) (#52135)
* Update activating-the-enterprise-edition.md

another little nitpick, since people tend to get creative with these things and then we end up debugging endless hours

* edit

---------

Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: jeff bruemmer <jeff.bruemmer@gmail.com>
2025-01-14 19:49:28 +00:00
github-automation-metabase
103e4ea17f Update activating-the-enterprise-edition.md (#52113) (#52128)
* Update activating-the-enterprise-edition.md

Add details about Zscaler

* Update docs/paid-features/activating-the-enterprise-edition.md



---------

Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-14 18:38:27 +00:00
github-automation-metabase
15ffab7ce1 docs - preference for docker when self-hosting (#52122) (#52125)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-14 18:17:30 +00:00
github-automation-metabase
e5b2155be7 update eslint rules to restrict importing from react-redux directly (#52114) (#52117)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2025-01-14 16:12:26 +00:00
github-automation-metabase
f991a31f78 Run search index worker on every instance (#52108) (#52115)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2025-01-14 16:05:38 +00:00
github-automation-metabase
900854cda9 fix mobile text cards height (#52062) (#52105)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2025-01-14 14:58:08 +00:00
github-automation-metabase
43ca74b739 Fix module errors when Embedding SDK Cypress tests running in development mode (#52093) (#52104)
Co-authored-by: Timofey Kachalov <timofei@metabase.com>
2025-01-14 14:41:59 +00:00
github-automation-metabase
bb6db86f3d Update error colors following the new design (#52029) (#52091)
* Update error colors following the new design

* Update loki snapshots

* Fix unit test expectation to hex

* Make colors easier to understand with comments

* Fix E2E tests

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-01-14 11:35:31 +00:00
github-automation-metabase
47c849e928 Fix - Removing the source filter from a linked filter will leave the latter broken (#52034) (#52086)
* Add repro for #49556

* Format code

* Fix #49556

* Format code

* Rename const

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2025-01-14 08:48:21 +00:00
github-automation-metabase
ef5fbaa64a single frontend required check (#52066) (#52073)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-01-13 23:36:41 +00:00
github-automation-metabase
e85b71b889 cherry-pick conflict resolution (#52061)
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2025-01-13 22:27:43 +00:00
lbrdnk
c1bb251b98 Backport Databricks M2M auth to 52 (#51900)
* Add M2M Oauth to Databricks Driver (#51476)

* Add M2M Oauth to Databricks Driver

* Add toggle for PAT/M2M Oauth

Introduces a 'Use Personal Access Token' toggle button which shows different UI components when setting up the connection. The implementation was inspired by @snoe in #51249

* Address feedback from @ibrdnk

Addresses the feedback related to #pullrequestreview-2515818008

* Default M2M, Add conditional Merge, Reduce whitespace

* Update docs/databases/connections/databricks.md

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

* Add test for external contribution (#51693)

* Prefer the external PRs docs change (conflict resolution)

* Upgrade databricks jdbc driver

---------

Co-authored-by: Alexander Viala Bellander <42417723+AlexVialaBellander@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeffbruemmer@gmail.com>
2025-01-13 21:58:38 +01:00
github-automation-metabase
c025d14dd8 docs - update links (#52047) (#52055)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-13 19:41:51 +00:00
github-automation-metabase
51ee326c80 Fix 53rd week formatting (#52038) (#52044)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-01-13 22:52:19 +04:00
github-automation-metabase
913bccff53 Fix pivot drill thru for multi-stage queries (#51950) (#52048)
* Fix pivot drill thru for multi-stage queries

* Add tests for multi-stage queries in pivot drill tests

* Fix e2e test

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-01-13 18:50:48 +00:00
github-automation-metabase
846f59d7a1 Typo (#52023) (#52039)
Co-authored-by: Abed Habli <154609371+abdhabli@users.noreply.github.com>
2025-01-13 16:08:21 +00:00
github-automation-metabase
bcfe824f21 Add Code component from Mantine (#51962) (#52024)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-01-13 15:24:49 +00:00
github-automation-metabase
07cbbb19a9 Enable realtime search indexing without experimental flag (#52018) (#52025)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2025-01-13 13:17:26 +00:00
github-automation-metabase
abfc819d6f Fix SDK release process failure (#52015) (#52022)
* debug

* [debug] upgrade gh version

* Fix the gh cli by using the latest version

* Fix gh not using the latest version

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2025-01-13 12:04:11 +00:00
github-automation-metabase
593a73ad49 Add trace logging for search index queue, and fix timer (#52017) (#52021)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2025-01-13 11:46:29 +00:00
github-automation-metabase
f5a6fe5bd7 🤖 backported "[Notification] reduce memory footprint" (#52011)
* [Notification] reduce memory footprint (#51708)

---------

Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2025-01-13 05:49:50 +00:00
github-automation-metabase
16faa91c76 Fix parameter mappings reset logic (#52009)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-01-11 04:42:10 +00:00
github-automation-metabase
db85e4751c allow changing x-axis column settings (#51953) (#52005)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2025-01-11 03:10:14 +00:00
github-automation-metabase
66ceea21fb Convert ChartsettingOrderedItems to match ChartSettingSelect (#51332) (#51978)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-11 02:27:13 +00:00
github-automation-metabase
ff6a641345 Fix ChartSettingsPopover style/z-index issues (#51154) (#51977)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-10 17:49:13 -08:00
github-automation-metabase
5b9361a321 Fix zoom-in.geographic drill thru for multi-stage queries (#51891) (#51993)
* Update docstring in zoom-in.timeseries

The comment is stale. Construction of dimensions from row data is now done in available-drill-thrus.

* Fix zoom-in.geographic drill thru for mutli-stage queries

* Fix return type schema for lib.underlying/top-level-column

* Add append-filter-stage-to-test-expectation to drill-thru test-utils

* Add tests for multi-stage queries to zoom-in.geographic tests

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-01-10 21:30:56 +00:00
github-automation-metabase
e6329a6c62 fix pivot table is not rendered until resized (#51951) (#51990)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2025-01-10 20:59:57 +00:00
github-automation-metabase
3b32e844b5 allow disabling table pivot when new columns were added (#51893) (#51981)
* allow disabling table pivot when new columns were added

* specs

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2025-01-10 19:20:37 +00:00
github-automation-metabase
7a8c415e2b Fix quick-filter drill thru for multi-stage queries (#51807) (#51980)
* Fix quick-filter drill thru for multi-staged queries

* Add column-by-name and append-filter-stage to drill-thru test utils

* Add quick-filter tests for multi-stage queries

* Allow drill-thru tests to pass an update fn for :custom-{query,native,row}

The update fn will get passed the default value for the test case based on query-table and query-type. This allows
callers to easily modify or extend the default, rather than having to look it up or recreate it from scratch.

    ;; same as the standard test query, but with an extra filter stage
    :custom-query #(lib.drill-thru.tu/append-filter-stage % "count")

* Use mu/defmethod and mu/defn for column-by-name and append-filter-stage

* Add lib.drill-thru.test-util/prepend-filter-to-stage

* Add lib.drill-thru.tu/test-drill-variants-with-merged-args

A helper function to make it easy to call test-returns-drill or test-drill-application with minor variations of some
base case (for example, drill behavior should remain unchanged when called with a query with filter stage after
aggregations).

* Use test-drill-variants-with-merged-args for quick-filter multi-stage tests

* Add multi-stage quick-filter tests for a couple of unaggregated queries

* Use lib.drill-thru.tu/column-by-name in metabase.lib.drill-thru-test

* Use lib.drill-thru.tu/column-by-name in lib.drill-thru.test-util.canned

* Support skipping tests in test-drill-variants-with-merged-args

* Allow variant-case to be a fn in test-drill-variants-with-merged-args

* Clean up test formatting

* Reduce diff

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-01-10 18:45:06 +00:00
github-automation-metabase
e7741933ad 🤖 backported "feat(sdk): Modify Interactive Question Layout" (#51103)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-10 09:55:07 -08:00
github-automation-metabase
37a5031744 🤖 backported "docs: H1 edits" (#51975)
* Add backport resolution script

* docs: H1 edits (#51940)

* H1 edits

* Apply suggestions from code review

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

* review suggestions

---------

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

* im stupid

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-10 12:33:41 -05:00
github-automation-metabase
ae2c0b9064 🤖 backported "Convert aggregation order-bys to reference by index instead of uuid before hashing" (#51841)
When you order by an aggregation, mbql v2 references the aggregation by uuid.  However, that makes the query hash to a different value each time, because you get a different uuid each time you hash it.  Converting the query to reference by index during the hashing process fixes this.


Co-authored-by: William <william@metabase.com>
2025-01-10 16:29:26 +00:00
github-automation-metabase
db5213ebf2 fix(sdk): Fix alignment of ColorSelector in SDK Chart Settings (#51000) (#51325)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-10 16:28:49 +00:00
github-automation-metabase
f6039a8b27 🤖 backported "Show errors from backend in Create API key modal" (#51580)
* Show errors from backend in Create API key modal (#51395)

* Add selectDropdown to helpers

* Revert change to yarn.lock

---------

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2025-01-10 15:31:00 +00:00
github-automation-metabase
0a5091e9b7 Correct docstring for series (#51840) (#51939)
Minor nitpicks on some endpoint docstrings

Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
2025-01-09 22:51:12 +00:00
github-automation-metabase
57a2704ecc Setting alignment to top for icons in subscription and alert emails (#51886) (#51935)
Co-authored-by: Tyler Plude <tsplude@gmail.com>
2025-01-09 20:39:06 +00:00
github-automation-metabase
abdb35cd46 Fix formatting of month-of-year when there are 53 weeks in the year (#51892) (#51933)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-01-09 19:36:23 +00:00
github-automation-metabase
4749f6127b merge (#51871)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-09 14:26:53 -05:00
github-automation-metabase
9e5c80a02c upload title (#51931) (#51932)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-09 19:23:03 +00:00
github-automation-metabase
31445dbf36 reset cache when starting cypress locally (#51921) (#51927)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-01-09 17:45:50 +00:00
github-automation-metabase
1c1c5c73c6 Actions preprocess queries before compiling (#51724) (#51887)
We need to preprocess queries (and use the results) to ensure that we properly cast arguments in where clauses

Co-authored-by: William <william@metabase.com>
2025-01-09 00:45:05 +00:00
github-automation-metabase
ad08889c49 🤖 backported "chore(e2e): create helpers for viz settings and viz type buttons"
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2025-01-08 21:58:59 +03:00
github-automation-metabase
7746127c36 fix: Change pool acquireRetryAttemps to 0 (#51296) (#51866)
* fix: Change pool acquireRetryAttemps to 1

Fixes: #51176

* Address PR review and only test dbs with username auth

* Fix model ref

* Exclude hive-like connections

* Ensure user and password

Co-authored-by: Case Nelson <case@metabase.com>
2025-01-08 18:03:45 +00:00
github-automation-metabase
8945237d64 Set key auth as the default auth method, put warning password (#51249) (#51867)
* Set key auth as the default auth method, put warning on username and password

* Fix password / keyfile existing at once

* Address review

Co-authored-by: Case Nelson <case@metabase.com>
2025-01-08 18:02:56 +00:00
github-automation-metabase
db62b93d77 fix merge conflict (#51860)
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2025-01-08 17:15:46 +00:00
github-automation-metabase
e6cdbbc9ed docs - add enterprise-only key to SDK blockquote (#51815) (#51819)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-08 14:01:00 +00:00
github-automation-metabase
cc77eeb655 Make JWT provider URI optional (#51832) (#51834)
* make jwt provider URI optional

* prettier

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-01-07 23:11:30 +00:00
github-automation-metabase
e03d60b58d Convert ChartSettingFieldsPartition to mantine (#51223) (#51827)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2025-01-07 22:50:11 +00:00
github-automation-metabase
425b0d57aa Cache logins in e2e tests (#51715) (#51835)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-01-07 22:04:02 +00:00
github-automation-metabase
f300cad7a7 docs - relocate contributing file (#51764) (#51831)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-07 20:13:07 +00:00
github-automation-metabase
0ab4227609 Small a11y improvements (#51577) (#51825)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2025-01-07 19:49:13 +00:00
github-automation-metabase
0368036c27 docs - note on bigquery structs (#51822) (#51824)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-07 18:52:41 +00:00
github-automation-metabase
d70c78f321 docs - mb-disable-scheduler (#51812) (#51820)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-07 18:13:28 +00:00
github-automation-metabase
2c21568f06 Enable N-parallelism for e2e tests (#51433) (#51740)
# Conflicts:
#	.github/actions/build-e2e-matrix/action.yml

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2025-01-07 09:43:26 -07:00
github-automation-metabase
6d36ae40ab Handle exception in rollback better (#51675) (#51814)
Handle exception in rollback better

Co-authored-by: Nathan Voxland <nathan@metabase.com>
2025-01-07 16:01:40 +00:00
github-automation-metabase
2d4e621699 put field usage behind a feature flag and turn it off by default (#51677) (#51781)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2025-01-07 04:25:49 +00:00
github-automation-metabase
d8ef748f8b 🤖 backported "docs - links" (#51785)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-06 12:15:13 -05:00
github-automation-metabase
c9794736c5 Fix the zoom-in.binning drill thru for multi-stage queries (#51489) (#51753)
* Make renaming options optional in lib.underlying/top-level-column

* Construct dimensions from row data in available-drill-thrus

Construct dimensions from row data once in available-drill-thrus, rather than doing it in each drill that needs it
separately. The dimensions must be constructed in available-drill-thrus since some drills are expected to
return-drills-for-dimensions?, but this also has the side benefit of reducing code duplication by lifting the
rows->dimensions conversion up into a single place.

* Fix the zoom-in.binning drill thru for multi-stage queries

* Add tests for zoom-in.binning with multi-stage queries

* cljfmt

* Explicitly disable the automatic-insights drill for multi-stage queries

Previously, this drill will was implicitly disabled for multi-stage queries because the FE would not pass dimensions
for queries with underlying breakouts / aggregations. Now that dimensions are reconstructed in available-drill-thrus,
automatic-insights drill is available again, but if you try to actually run the drill you get a big scary "Something
went wrong" error, so just explicitly disable the drill until we fix it.

* Update test/metabase/lib/drill_thru/zoom_in_bins_test.cljc



* Review feedback: not-empty -> seq

* Reivew feeback: shadow rather than using a single-quote suffix

* Review feedback: underyling -> underlying

---------

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: Braden Shepherdson <braden@metabase.com>
2025-01-06 16:51:29 +00:00
appleby
865d4c2efe Update Loki snapshots for 2025 (#51768) 2025-01-06 08:07:49 -08:00
github-automation-metabase
35495470d6 🤖 backported "docs - separate google sign-in and ldap docs" (#51750) 2025-01-06 09:52:24 -05:00
github-automation-metabase
c9da3ba457 adjusting webhook test response ui (#51043) (#51387)
* adjusting webhook test response ui

* missed i18n, updating test to check for test response

* show response on error, not success

* parse the request as json response

---------

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2025-01-06 13:38:53 +00:00
github-automation-metabase
17a4842e9e [svg] Limit the lifetime of a cached Truffle JS engine to sidestep apparent memory leaks (#51685) (#51773)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2025-01-06 10:04:46 -03:00
github-automation-metabase
70889998f8 Fix compare-aggregations drill for multi-stage queries (#51608) (#51754)
Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2025-01-03 21:48:14 +00:00
github-automation-metabase
115319e957 🤖 backported "split up query stage e2e test file" (#51705)
* split up query stage e2e test file (#51583)

* split up query stage tests

# Conflicts:
#	e2e/test/scenarios/dashboard-filters-2/dashboard-filters-query-stages.cy.spec.ts

* update for merge to master

* fix
# Conflicts:
#	e2e/support/helpers/e2e-misc-helpers.js
#	e2e/test/scenarios/dashboard-filters-2/dashboard-filters-query-stages.cy.spec.ts

* fix test to account for not saving in dashboard

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-01-03 10:26:33 -07:00
github-automation-metabase
8ec7f12861 Add link to support matrix (#51737) (#51739)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-03 15:08:30 +00:00
github-automation-metabase
047e7bc43d 🤖 backported "🍾 🎆 Happy new year e2e test fixes 🎆 🍾 " (#51723)
* Happy new year e2e test fixes (#51720)

* kick ci

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2025-01-02 22:57:13 +00:00
Alex Yarosh
e51badb8d1 fix links (#51718) 2025-01-02 15:09:23 -05:00
github-automation-metabase
722e7cbcf5 docs - env vars in config files (#51642) (#51643)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2025-01-02 14:21:40 +00:00
Alex Yarosh
10295f4d0f alerts 52 (#51697) 2024-12-31 11:26:13 -05:00
github-automation-metabase
d99dca5857 🤖 backported "Ensure collections' effective_location is batch hydrated when hydrating effective_parent" (#51682)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-12-27 15:55:20 +00:00
github-automation-metabase
3efebabbd4 perf: Make registered? and initialized? checks faster for already initialized drivers (#51023) (#51668)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-12-26 15:45:32 +00:00
github-automation-metabase
aed2acff36 Fix glitching series on hover in Safari (#51611) (#51646)
* nasty hack but works

* apply to safari only

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-23 20:14:17 -05:00
github-automation-metabase
ed4a7bf795 Fix method definitions (#51473) (#51623)
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-12-23 21:10:11 +00:00
github-automation-metabase
b5e537b56b feat(sdk): make editable dashboard grid border color themeable (#51060) (#51635)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-23 17:48:51 +00:00
github-automation-metabase
5086e9d547 docs(sdk): fix initial parameter props name in dashboards (#51625) (#51633)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-23 17:07:52 +00:00
github-automation-metabase
3e0a25dbd5 Fix instance stats cypress test + ensure it runs in CI (#51531) (#51541)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-12-23 15:07:48 +00:00
github-automation-metabase
2f8c560ddd [serdes] extract tabId in click_behavior (#51588) (#51613)
also, somewhat relatedly, create `elide-fk` function to skip pieces of data holding FKs to deleted targets

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-12-21 15:10:49 +03:00
github-automation-metabase
97e8cae76b Bump Toucan2 version (#51547) (#51555)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-12-21 09:57:19 +02:00
github-automation-metabase
355ba93c08 Fix summarize-column and summarize-column-by-time drills for multi-stage queries (#51553) (#51609)
* Fix summarize-column drill for multi-stage queries

* Fix the summarize-column-by-time drill for multi-stage queries

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2024-12-21 02:23:41 +00:00
github-automation-metabase
2f6f878b43 Batch query_execution, audit_log and view_log truncations (#51490) (#51602)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-12-20 22:38:00 +00:00
github-automation-metabase
68b2f66dca ci: Fix be-tests stub (#51545) (#51597)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-12-20 20:51:55 +00:00
github-automation-metabase
38f63e4ab7 Add description to metric API responses (#51448) (#51593)
* Generate suggested_name on card read

* Add test

* Comment

* Naming and comment

* Use m/assoc-some

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-12-20 20:34:54 +00:00
github-automation-metabase
4dcb015dc9 Add debug logging for chain filter query (#51481) (#51594)
* Add debug logging for chain filter query

* Comment

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-12-20 20:32:56 +00:00
github-automation-metabase
8ad2516b8e [Cmd Palette] Do not show admin and settings links to users who do not have access (#50887) (#51592)
* fixes showing admin links to not admins in the command palette

* updates calculation to take into account EE advanced permissions allowing certain users permissions to change settings who are not admins

* admin routes for non-admins

* fix unit tests

* actually fix unit tests

* adding checks for other permissions

---------

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2024-12-20 20:28:01 +00:00
github-automation-metabase
1e8a62de75 Minor refactoring of cancellation-related code (#49815) (#51586)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-12-20 18:32:02 +00:00
github-automation-metabase
22b0535c3c ci: Only run driver tests when testing Databricks driver (#51543) (#51584)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-12-20 16:56:52 +00:00
github-automation-metabase
cbcbc23740 Pass uuids as strings to SQL Server (#51484) (#51582)
Azure Synapse doesn't like it when you give it a uuid parameter, even though synapse does support uuids in general.
Converting those uuids to strings beforehand fixes this error, and regular SQL Server is also fine with that.

Co-authored-by: William <william@metabase.com>
2024-12-20 16:29:59 +00:00
github-automation-metabase
7481fbd341 fix broken radio buttons in viz settings (#51558) (#51581)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-20 16:24:38 +00:00
github-automation-metabase
f4e04450ed add tests for support of xx-YY locales in embed/public-links (#51456) (#51579)
* fix: add supports for xx-YY locales in embed/public-links

* Generate locales.json

* [WIP] Read locales.json

* wip FE implementation

* refactor + unit and sdk component tests

* fixes after the merge, plus tests and cleand up logic

* fix file name in string

* change FE logic to use locales from the instance settings

* revert json generation

* remove leftover comment

* add comment about the code to keep in sync

* migrate e2e tests for static/public to use #locale=de-CH so we test that
it's using the fallback logic

* fix kondo error


* fix unit test

* fix more jest tests

* cy.request -> cy.intercept

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-12-20 16:07:55 +00:00
github-automation-metabase
e3f81d8275 fix(sdk): add supports for xx-YY locales in embed/public-links and sdk (#51002) (#51571)
* fix: add supports for xx-YY locales in embed/public-links

* Generate locales.json

* [WIP] Read locales.json

* wip FE implementation

* refactor + unit and sdk component tests

* fixes after the merge, plus tests and cleand up logic

* fix file name in string

* change FE logic to use locales from the instance settings

* revert json generation

* remove leftover comment

* add comment about the code to keep in sync

* fix kondo error


* fix unit test

* fix more jest tests

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-12-20 14:53:20 +00:00
github-automation-metabase
a153392382 Update SDK version to 0.52.6 (#51573)
* Update Readme version references and published npm version to 0.52.6

* Update CHANGELOG.md

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-20 14:37:19 +00:00
github-automation-metabase
4005c0a734 [openapi] reduce amount of oneOf/allOf we generate in documentation (#51495) (#51569)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-12-20 14:12:51 +00:00
github-automation-metabase
de9424e1c9 ci(sdk): make 52 the latest in release workflow (#51552) (#51567)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-20 12:10:24 +00:00
Phoomparin Mano
23696368f3 ci(sdk): remove the nightly tag from version 52 (#51551) 2024-12-20 19:05:24 +07:00
github-automation-metabase
0cb7dbf187 Fix non-legible text and icon colors in fullscreen dark mode (#51538) (#51563)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-20 11:48:14 +00:00
github-automation-metabase
0d358d4fa3 docs - remove release page (#51410) (#51418) 2024-12-19 16:47:56 -05:00
github-automation-metabase
c05667343f show all columns in scatter tooltip by default (#51480) (#51544)
* show all columns in scatter tooltip by default

* update e2e spec

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-19 16:14:16 -05:00
github-automation-metabase
9e89e4a16f perf: Add fastpaths to url? and email? predicates (#51522) (#51529)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-12-19 21:14:13 +00:00
github-automation-metabase
c1d70d364f Fix pdf exports issues (#51491) (#51540)
* fix horizontally trimmed content on short pages

* include filters

* update specs

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-19 21:02:00 +00:00
github-automation-metabase
c2f9e583c5 [Clean-up] Allow collection clean up banner to be dismissible (#51434) (#51539)
* allow collection clean up banner to be dismissable

* small change

* dismiss the banner if the user uses the clean up modal

* add test coverage

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-12-19 20:44:12 +00:00
github-automation-metabase
d0e4983bf1 Try a band-aid fix for native editor e2e flakes (#51528) (#51535)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-12-19 19:30:14 +00:00
github-automation-metabase
a0c22c1da3 Convert ChartSettingSelect to Mantine (#50977) (#51533)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-12-19 18:57:17 +00:00
github-automation-metabase
8b34ce545f quarantine flakes caused by problems with typing in the native editor (#51520) (#51530)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-19 18:50:30 +00:00
github-automation-metabase
7c859a25bf docs: Updating "Export dashboard as PDF" (#51506) (#51527)
* Updating "Export dashboard as PDF"

* Typo

* updating the screenshot

Co-authored-by: Abed Habli <154609371+abdhabli@users.noreply.github.com>
2024-12-19 17:17:55 +00:00
github-automation-metabase
80581e5b3f Don't crash for ignored status codes in embedding responses (#51408) (#51485)
* short circuit tracking for ignored requests

- add fall-through for ignored embedding requests

* add test for ignored status codes

* remove cruft

* add logging for unknown clients or statuses

* Fix some e2e tests in custom-column and view-data (#51431)

* warn on reflection!

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-12-19 15:46:13 +00:00
github-automation-metabase
e7154f61ec add sdk theme selector to storybook + split the storybook sdk config into its own folder (#51122) (#51497)
* add sdk theme selector to storybook

* let's try to split the storybook

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-19 13:29:48 +00:00
github-automation-metabase
79f23e5374 fix(types): fix type error on textCard in static-dashboard.cy.spec.tsx (#51450) (#51500)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-19 13:15:42 +00:00
github-automation-metabase
c32541004c remove translation for slack error (#51375) (#51378)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-12-19 08:25:43 +00:00
github-automation-metabase
2149fabcec Add field values e2e test (#51424) (#51465)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-12-18 14:47:30 -05:00
github-automation-metabase
0db4403866 add percentages to sankey tooltip (#51193) (#51464)
* add percentages to sankey tooltip

* another tooltip variant

* specs

* lint

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-18 17:51:56 +00:00
github-automation-metabase
b926fa2e65 ci: trim stacktrace of intentional exceptions thrown during testing (#51443) (#51455)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-12-18 15:28:43 +00:00
github-automation-metabase
ab954c5a47 feat(sdk): use metabase type prefix and re-export types (#51072)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2024-12-18 21:55:11 +07:00
github-automation-metabase
d0220ff31b fix(sdk): update define function names in Next.js compat (#51071) (#51453)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-18 14:03:26 +00:00
github-automation-metabase
3bb077b92e Convert ChartSettingInputNumeric to Mantine (#51165) (#51444)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-12-18 12:52:34 +00:00
github-automation-metabase
13d29702d5 Typo (#51440) (#51451)
Co-authored-by: Abed Habli <154609371+abdhabli@users.noreply.github.com>
2024-12-18 12:39:47 +00:00
github-automation-metabase
f229c492e0 🤖 backported "fix(sdk): migrate to custom redux context to allow using the sdk on host apps that use redux" (#51414)
* step1: add MetabaseReduxProvider and make our hooks + connect fn use it

step1: add MetabaseReduxProvider and make our hooks + connect fn use it

* step 2: codemod

* step 3: manual fixes

* step 4: e2e test for sdk

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-18 12:48:16 +01:00
github-automation-metabase
aa73307807 🤖 backported "lychee to lint doc links" (#51429)
* lychee to lint doc links (#51422)

Co-authored-by: Ryan Laurie <iethree@gmail.com>

* tests(jest): add ES module is-absolute-url to the transform ignore (#51438)

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-12-18 09:54:03 +00:00
github-automation-metabase
c7330a1245 Send pulse asynchronously with a small pool size (#51380) (#51392)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-12-18 04:01:16 +00:00
github-automation-metabase
a3da18604a 🤖 backported "Replace Search Index setting with a table" (#51407)
Co-authored-by: Chris Truter <chris@metabase.com>
2024-12-17 20:16:14 +02:00
Phoomparin Mano
df5ab529bf ci(sdk): re-enable sdk e2e cross version tests for 52 branch (#51402)
* revert me - run this workflow against the release-x.52.x branch

* Revert "revert me - run this workflow against the release-x.52.x branch"

This reverts commit 09026adc45.

* re-enable cross-version tests
2024-12-18 01:03:07 +07:00
github-automation-metabase
ef5c82a27c 🤖 backported "Add prometheus metric for search errors" (#51381)
Co-authored-by: Chris Truter <chris@metabase.com>
2024-12-17 20:08:38 +03:00
github-automation-metabase
49fa2feada Avoid frequent setState calls in the add parameter popover in dashboards (#51373) (#51403)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-12-17 16:33:42 +00:00
github-automation-metabase
79b2b15885 ci(sdk): skip flaky mantine styles test for sdk (#51404) (#51405)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-17 15:44:31 +00:00
github-automation-metabase
ed5fe91bf0 Update Readme version references and published npm version to 0.52.5-nightly (#51396) 2024-12-17 14:48:57 +00:00
Phoomparin Mano
36cc34b02d ci(sdk): reconcile sdk version number in 52 branch (#51391) 2024-12-17 21:28:33 +07:00
github-automation-metabase
6af3f9e5c3 Add basic auth on druid JDBC driver (#50905) (#51331)
Co-authored-by: Demetrio <53023423+ddowbnac@users.noreply.github.com>
2024-12-17 15:06:54 +01:00
Phoomparin Mano
b858a42c22 Disable failing sdk e2e cross-version tests in 52 branch (#51389)
* temporarily disable e2e cross-version tests

* Revert "temporarily disable e2e cross-version tests"

This reverts commit b5c6094635.

* skip until workflow is fixed
2024-12-17 21:03:13 +07:00
Phoomparin Mano
77e4a6dcb6 ci(sdk): embedding e2e workflow fixes for 52 branch (#51268)
* Fix Embedding SDK cross-version e2e tests for release 51 branch (#51171)

* bogus change to trick the ci - to revert

* add the stub back

* fix the stub name

* fixme - hard code sdk_version for testing the workflow

* fixme - hard code build requirements for testing the workflow

* check resolved package path

* fixme - check why require.resolve is erroring

* fixme - add console log to get resolved package path

* fixme - additional ci debugging logs

* fixme - try limiting module search path to node_modules

* fixme - try multiple strategies for resolving modules

* fixme - throw a script error if resolution fails

* remove unused event.json

* fix webpack component script

* fixme - comment out pull_request event block

* return empty alias path if resolution failed

* temporarily skip create question tests

* fixme - debug create question tests failing

* fixme - debug create question tests failing

* fixme - revert sparse checkout version pinning

* fixme - change hard-coded sdk version

* revert fixme debugging changes

* cleanup workflow changes

* cleanup fixme changes to trigger ci

---------

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2024-12-17 19:08:11 +07:00
github-automation-metabase
52b2b0fdfb Make formatter integral? dependent on scale (#50609) (#51376)
* Fix unexpected rounding in csv & json exports when column multiplier is non integral

* Fixing table unit test

* Adding WIP test

* Adding test case for validating new scaling logic is applied appropriately in exports

* Reverting id-or-name change and adjusting new scaling unit test

* Updating formatting to fix cljfmt in CI

* removing debug def

* Preserving integral behavior if scale is nil

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2024-12-17 05:50:37 +00:00
github-automation-metabase
d3756e7e2f simplify font config by not providing sans-serif fallback (#51343) (#51355)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-16 18:45:06 +00:00
github-automation-metabase
1d398435a5 ci(sdk): add package.json to sdk exports block (#51328) (#51347)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-16 17:00:09 +00:00
github-automation-metabase
94aa8fde52 fix(View Details): calculate row after vertical and horizontal scroll (#51302) (#51340)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-12-16 15:56:44 +00:00
github-automation-metabase
1540d83e19 Implement cumulative aggregators in mongo (#51135) (#51293)
Previously, cumulative aggregators were being done in clojure after the mongo query was finished.  However, this
didn't work on multi-step queries where the cumulative aggregator wasn't the last step (for example, do a cumulative
sum and then filter the result).  Implementing cumulative operators directly in mongo fixes this issue.

Co-authored-by: William <william@metabase.com>
2024-12-16 14:56:54 +00:00
github-automation-metabase
a82db08236 docs(sdk): document the compatibility layer for nextjs (#51173) (#51335)
* wip nextjs compat docs

* explain how to do manual wrapping

* doocs

* better explanation of the index file

* Apply suggestions from code review



* Update docs/embedding/sdk/next-js.md



---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-16 14:09:01 +00:00
github-automation-metabase
cf33d59a6b fix(sdk): wrap InteractiveDashboard with renderOnlyInSdkProvider (#51224) (#51329)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-16 13:53:37 +00:00
github-automation-metabase
9c0c5ad32d Remove unnecessary transaction around query analysis (#51321) (#51322)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-16 11:11:33 +00:00
github-automation-metabase
594e80a5c8 🤖 backported "feat(sdk): move non-auth config options to provider" (#51063)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2024-12-16 17:21:09 +07:00
github-automation-metabase
135bbbc166 Convert ChartSettingsRadio to mantine (#51210) (#51287)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-12-16 09:53:59 +00:00
github-automation-metabase
34f019e07c Add story for QuestionSettings (#50998) (#51032)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-12-16 08:47:04 +00:00
github-automation-metabase
4476971f5a Convert ChartSettingToggle to Mantine (#51161) (#51286)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-12-16 08:44:05 +00:00
github-automation-metabase
a1525c7348 Convert ChartSettingInput to Mantine (#51162) (#51288)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-12-16 08:43:29 +00:00
github-automation-metabase
6f76bb6288 [ci] Actually test against different JDK versions (#51313) (#51314)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-12-14 21:05:14 +00:00
github-automation-metabase
155b7f92ba Bump c3p0 version (#51188) (#51310)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-12-14 17:26:21 +02:00
github-automation-metabase
44d0439f37 Fix distribution drill thru for multi-stage queries (#51247) (#51311)
* Add missing -test suffix to zoom-in-timeseries test name

* Add missing -test suffix to underlying-records test name

* Fix distribution drill thru for multi-stage queries

Ensure the distribution drill thru is not returned by available-drill-thrus when a user clicks on an aggregation or
breakout column, even if there are additional query stages after the last aggregation / breakout stage.

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2024-12-14 08:14:43 +00:00
github-automation-metabase
aa77297ea2 fix pie chart incorrect settings memoization (#51305) (#51309)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-14 00:29:53 +00:00
github-automation-metabase
0ec00d015b Don't compute a different hash key if they only differ on the order of values in a parameter (#51186) (#51306)
Don't compute a different hash key if they only differ on the order of values in a parameter

Co-authored-by: Nathan Voxland <nathan@metabase.com>
2024-12-13 22:49:54 +00:00
github-automation-metabase
7d7978c274 Update underlying-records drill to use code in lib.drill-thru.common (#51254) (#51298)
Some funcs were added to lib.drill-thru.common for the recent fix to the zoom-in.timeseries drill. Update the
underlying-records drill to use the common lib code rather than duplicating it.

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2024-12-13 22:38:06 +00:00
github-automation-metabase
fcbcab8ccc pin to master (#51294) (#51300)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-12-13 20:43:18 +00:00
github-automation-metabase
af0256d44f Quiet snowflake logging (#51138) (#51170)
It looks like snowflake introduced some very noisy logging in their
code.

9b7c9eb3e0 (diff-7859cac7243b3b9668df0770c96e264a1be2be06eefbbf7bba63904104028495L743)

This should reduce the noise and allow our code to handle and log the
exceptions.

Co-authored-by: Case Nelson <case@metabase.com>
2024-12-13 19:54:43 +00:00
github-automation-metabase
19065579d9 Update test to use revert icon (#50956) (#51292)
We changed the time_history icon in this context to a revert icon in #46050 but never updated this test. This PR fixes that.

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-12-13 18:40:38 +00:00
github-automation-metabase
6c05340d04 Split dashboard PDF exports into pages (#49917) (#51266)
* save only grid on fixed width dashboards

* split export pdf into pages

* trim dashboard export pdf into pages

* specs

* add padding to pdf pages

* dark mode

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-13 16:10:44 +00:00
github-automation-metabase
ff3a249260 Use pr-str so log data is parseable (#51275) (#51278)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-13 12:54:34 +00:00
github-automation-metabase
871cabb15a Convert ChartSettingSegmentedControl to Mantine (#50994) (#51272)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-12-13 10:38:38 +00:00
github-automation-metabase
9b768f1d44 Fix - Updating a filter via click behavior will not populate the field on actions (#51108) (#51270)
* Fix #51020

* Add a repro for #51020

* Improve test name

* Update comment and naming

* Improve diff

* Add repro for when primary key is not called 'id'

* Update repro

* Drop prefetchesInitialValues & getValuesForUpdate

It's unclear what the real intention behind these two was, but it's clear that it made two differences:
(1) It decreased the probability of overwriting someone else's changes (if someone else saved them after we opened the form)
(2) It decreases the payload sent over the wire

(1) We can ignore this, as this problem is prevalent everywhere in our app
(2) This is negligible

Dropping these is simpler than enhancing getValuesForUpdate with extra logic for primary keys (and who knows what else)

* Break beforeEach into 2

* Remove no longer valid test

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-12-13 09:21:10 +00:00
dpsutton
4e625d8a4b tests are failing the 52 branch (#51265)
should be reverted but we want a 52 release

context:
https://github.com/metabase/metabase/actions/runs/12307551790/job/34351648561
2024-12-12 22:05:08 -05:00
dpsutton
00874044a3 guard against a stage number in matching (#51263)
* guard against a stage number in matching

old:

`{"category":["dimension",["field",5,{"base-type":"type/Integer"}]]}`

new:

`{"state":["dimension",["field",48,{"base-type":"type/Text"}],{"stage-number":0}]}`

(comment
  (let [login-attributes {"state" "CA"}
        field-ids #{55 46 54 48 50 56 51 47 57 45 53 52 49}
        attribute_remappings {"state" [:dimension
                                       [:field
                                        48
                                        {:base-type :type/Text}]
                                        ;; this stage-number is optional. Newer versions have it since https://github.com/metabase/metabase/issues/46914
                                       {:stage-number 0}]}]
    (into {} (for [[k v] attribute_remappings
                   ;; get attribute that map to fields of the same table
                   :when (contains? field-ids
                                    (lib.util.match/match-one v [:dimension [:field field-id _]] field-id))]
               {k (get login-attributes k)})))
  )

* formatting fix
2024-12-12 20:55:37 -05:00
github-automation-metabase
7d88901955 Use the time_history icon to display when a question was last updated (#50952) (#51259)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-12-13 00:57:48 +00:00
metabase-bot[bot]
bac63b6e77 fix-release-log (#51238) (#51255)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-12-12 22:59:27 +00:00
github-automation-metabase
2db7312aaa update tracking for embedding-sdk-react and embedding-iframe x-metabase-clients (#51179) (#51250)
* skip tracking non react-sdk x-metabase-clients

- Do not do promethus tracking for sdk.
- tracking ignores x-metabase-client headers when they're not == "embedding-sdk-react"

* cleanup indentation

* add prometheus tracking counters for iframe

* remedy 24h query execution inaccuracy

Co-authored-by: bryan <bryan.maass@gmail.com>
2024-12-12 22:49:07 +00:00
github-automation-metabase
8dca3ea88c Allow config files to have literal values enclosed in {{{ ... }}} (#51129) (#51243)
Allow config files to have literal values enclosed in {{{ ... }}}

Co-authored-by: Nathan Voxland <nathan@metabase.com>
2024-12-12 21:50:16 +00:00
github-automation-metabase
109ba1a8b5 Backport the webpack config from 51171 to master (#51212) (#51231)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2024-12-12 18:41:15 +00:00
github-automation-metabase
219e591555 Update data.md (#51234) (#51236)
Tiny typo

Co-authored-by: Hervé Labas <431257+thebiglabasky@users.noreply.github.com>
2024-12-12 18:37:31 +00:00
github-automation-metabase
b7860f0011 note on static embeds (#51181) (#51227)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-12-12 16:34:53 +00:00
github-automation-metabase
dd5ad8410a Enable bug reporting (#50856) (#51218)
* add bug report to command palette and profile menu

add bug report to command palette and profile menu

* refactor and update diagnostic window modal

* add analytics to track bug reporter modal activity

* add file id to to the upload-file method

* add the ability to collect browser information for diagnostic window

* implement feedback from PR comments

* Update frontend/src/metabase/components/ErrorPages/ErrorDiagnosticModal.tsx



* implement feedback from PR comments #2

* rename "file a bug" to "report an issue"

* resolve conflict

* fix lint issues

* fix bad merge conflict resolution

* fix failing onboarding tests

---------

Co-authored-by: Filip Hric <filip@filiphric.sk>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-12-12 15:04:27 +00:00
github-automation-metabase
178164d942 Fix the "invite" screenshot (#51098) (#51105)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-12-12 15:11:36 +01:00
github-automation-metabase
b65981a8fa More logging around search index maintenance (#51206) (#51214)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-12 13:54:44 +00:00
github-automation-metabase
125f512df8 🤖 backported "Better diagnostic info when Search Index is not ready" (#51207)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-12 13:37:34 +00:00
github-automation-metabase
98c93fdb12 🤖 backported "Ignore interpolated expressions in query analysis" (#51164)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-12 15:25:56 +02:00
github-automation-metabase
37bb29eb78 logo link (#51177) (#51211)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-12-12 12:57:20 +00:00
github-automation-metabase
bd09c2ab5b Prevent newly opened items from expanding outside viewport (#51008) (#51204)
* Prevent newly opened items from expanding outside viewport

* Expand the unti test coverage

* Use the existing helper

* Change scroll view to center

This works better because it ensures that the top bar doesn't cover the element.

* Update frontend/src/metabase/home/components/Onboarding/Onboarding.tsx



* Extract the `stopVideo` function

* Fix the type name

* Set the top scroll margin on the `main` element

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-12-12 11:42:55 +00:00
github-automation-metabase
5f37af834f docs(sdk): simpler documentation for building the sdk locally (#51064) (#51205)
* wip: better documentation for developers that need to run the sdk
locally

* morning fixes

* remove developers-guide/sdk in favor of dev.md in the sdk folder

* add note about using the sdk with link to the docs

* fix mising word

* addressed feedback

* added notes about the envs for sdk e2e test

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-12 11:42:07 +00:00
github-automation-metabase
11ccfdb191 Update nanoid and path-to-regexp (#51198) (#51200)
* Force nanoid onto 3.3.8

* Force path-to-regexp to 0.1.12

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-12-12 10:57:16 +00:00
github-automation-metabase
095d521010 Migrate favicon logic to mantine hook (#50878) (#50932)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-12-12 10:01:23 +00:00
github-automation-metabase
46ad314535 Manual backport workflow fixes from 51171 (#51196) (#51199)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-12 08:58:56 +00:00
github-automation-metabase
f18b63e49b Make release log updates smarter (#49340) (#51190)
* make release log updates smarter

* fix a bunch of stuff after testing

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-12-12 00:21:00 +00:00
github-automation-metabase
186fcd9d17 Add v0.51.8 to the list of releases (#51153) (#51163)
* Add v0.51.8 to the list of releases

* ordering

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: jeff bruemmer <jeff.bruemmer@gmail.com>
2024-12-11 15:08:34 +00:00
github-automation-metabase
c15a51f210 Fix alert condition text (#51117) (#51156)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-12-11 13:46:55 +00:00
github-automation-metabase
8ea66a3867 🤖 backported "feat(sdk): use public-facing question type in event handlers" (#51037)
* feat(sdk): use public-facing question type in event handlers (#50867)

* introduce public metabase question type

* revise internal question type

* update stories

* use public question type in dashboard card plugins

* add tests for transforming question properties

* add tests for question description

* re-export the MetabaseQuestion type

* fix lint imports

* change publicQuestion to sdkQuestion

* name cannot be null if the card is present

* reduce collection browser flake

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2024-12-11 12:37:39 +00:00
github-automation-metabase
34657a48c8 [search] track total search indexing time as prometheus metric (#51095) (#51152)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-12-11 12:21:03 +00:00
github-automation-metabase
1e275b9e49 feat(sdk): support sql parameters in interactive questions (#50728) (#51061)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Phoomparin Mano <phoomparin@gmail.com>
2024-12-11 10:36:16 +00:00
github-automation-metabase
1563e743fe Dismissible "How to use Metabase" sidebar link (#50536) (#51132)
* Add new user-level setting

* Add selector

* Make link dismissible from the sidebar

* Transfer the onboarding link to the main "gear" menu

* Add E2E test to cover the link dismissal behavior

* Add tests for the settings menu link

* Fix tests

* Provide useful comment in the e2e test

* Provide contextual explanations to translators

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-12-10 23:48:39 +01:00
github-automation-metabase
8cd877ec83 Avoid logging stacktrace in streaming (#51053) (#51094)
* Avoid logging trace

* Demote log to warning

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-12-10 20:53:52 +00:00
github-automation-metabase
3837ed899d Add binning to display name (#50531) (#50946)
Add binning to display name similarly as done with bucketing.
---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-12-10 21:52:12 +01:00
Jeff Bruemmer
a852d1600b docs - api updates (#51115) 2024-12-10 19:53:32 +00:00
github-automation-metabase
68a464e477 🤖 backported "test: syncing views against all drivers" (#50897)
* test: see which drivers pass these tests

* Fix build

* Change test to use standard dataset, add initial implementation for bigquery

* Use fully qualified names for views

* Don't use transactions for databricks

* Make drop table only if exists, fix describe-index in mongo for views

* don't sync system.views

* Fix oracle drop-views, disable non-syncing views

* Use metabase-instance to find the table, this is important because redshift and oracle munge table name

* Fix oracle tests

* Fix oracle views

* Fix formatting

* Fix snowflake qualified components

* Change tests to opt out

* Fix sqlsserver

* Fix postgres test

* Disable h2 describe views test

* Address review

Co-authored-by: Case Nelson <case@metabase.com>
2024-12-10 20:52:17 +01:00
github-automation-metabase
21f5cb7bdd Resolved conflict (#51070)
Co-authored-by: Nathan Voxland <nathan@metabase.com>
2024-12-10 13:19:52 -06:00
github-automation-metabase
4114de8eba Count and Categorize Public Views in query executions table (#51079) (#51125)
* We need to look at the context field to categorize public views

* pull poll-unil into util ns

* fix comment typo

* add test

* update docstring

* remove true? call, it will return `true` on pass

* improve poll-until

Co-authored-by: bryan <bryan.maass@gmail.com>
2024-12-10 19:07:19 +00:00
github-automation-metabase
c84aaa0100 Fix the zoom-in.timeseries drill for multi-stage queries (#50970) (#51118)
* Fix the zoom-in.timeseries drill for multi-stage queries

If no dimensions are provided to the zoom-in.timeseries drill, then attempt to find the matching dimension from the FE-provided row data instead, if present.

Related to https://github.com/metabase/metabase/issues/46932

* Only return zoom-in.timeseries drills for clicks on aggregated columns

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2024-12-10 17:19:28 +00:00
github-automation-metabase
8c17699aa6 docs - locale params (#51001) (#51116)
* locale params

* formatting

* note on UI vs content

* interactive embedding

* language update

* plans blockquote

* asterisk

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-12-10 16:02:05 +00:00
github-automation-metabase
63833f46c1 🤖 backported "feat(sdk): combine title props in interactive question" (#51066)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-10 16:27:50 +02:00
github-automation-metabase
9b0b0cff8b 🤖 backported "Properly handle other users personal collections in collection picker" (#50834)
* Properly handle other users personal collections in collection picker (#50605)

* Properly handle other users personal collections in collection picker

* fixing types and unit test

* e2e adjustments

---------

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2024-12-10 13:32:53 +00:00
github-automation-metabase
9930ed8a4f feat(sdk): detect if session.id is not a string (#50890) (#51055)
* feat(sdk): detect if session.id is not a string

* use yup, also validate exp as we use it

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-10 10:56:27 +00:00
github-automation-metabase
489986cfa9 feat(sdk): next sdk compatibility layer (#50230) (#51059)
* wip next sdk compat

* better code generation, dts works

* Last line of file should end in a newline character

* feat(sdk): make MetabaseProvider not break ssr

* aUpdate enterprise/frontend/src/embedding-sdk/package.template.json



* address pr comments

* refactor(sdk): use relative paths when fixing d.ts files

* make types work on moduleResolution: node

* add loading text

* fix(sdk): #50736 make sure we don't break the host app if a sdk
component is rendered outside of the provider for a render

* fix: this should make types work for real?

* self review fixes

* update test for PublicComponentWrapper

* Update enterprise/frontend/src/embedding-sdk/components/private/PublicComponentWrapper/PublicComponentWrapper.tsx



* remove unused component

* eslint-disable-next-line for MetabaseProvider

* list tsx as dependency

* /next -> /nextjs

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-10 10:54:12 +00:00
github-automation-metabase
78d155bcda Fix embed loader not translated with #locale (#50841) (#51030)
* Fix embed loader not translated with #locale

* Fix unit tests

* Add E2E tests

* Fix a case where the lcoale is failed to load

* Simplify conditions in `LocaleProvider`



* Make E2E tests faster



---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-10 10:53:55 +00:00
github-automation-metabase
909441411b Make Loki's embedding scroll stories more resilient (#50991) (#51029)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-10 10:53:41 +00:00
github-automation-metabase
629b7939a2 Encapsulate default models to search (#50938) (#50995)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-10 08:21:50 +00:00
github-automation-metabase
f5f7d4d1df 🤖 backported "Fix race between jobs accessing the search index" (#50996)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-10 10:19:52 +02:00
github-automation-metabase
3cc3235615 Nested joins ignore temporal units (#50962) (#51065)
The underlying issue is that nest-query/nest-expression included temporal units when copying over joined fields into the nested query. This caused both the nested query and the parent query to include the "extract the unit from the date" code. In cases where the extraction didn't change the type, this duplication wasn't a big deal. However, for temporal units like hour-of-day, the first extraction changed the type of the field from date to string, and then the second extraction broke.  This change ensures that the inner query doesn't try to extract temporal units, which should avoid the duplicate extractions.

Co-authored-by: William <william@metabase.com>
2024-12-10 02:38:32 +00:00
github-automation-metabase
eac6e3b646 Add v0.52.2 to the list of releases (#51085) (#51087)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-12-10 00:35:36 +00:00
github-automation-metabase
3a985c3114 Fix missing tooltip on waterfall total bar (#50917) (#51005)
* fix scatter chart tooltip shows irrelevant info

* remove outdated spec as we always show the tooltip_column setting

* fix missing tooltip on the total bar on waterfall charts

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-09 19:13:35 -05:00
github-automation-metabase
35a4c284f9 feat: Introduce describe-indexes (#49982) (#51013)
* feat: Introduce describe-indexes

Fixes: #49981

Introduce a faster sync with describe-indexes that follows describe-fields
and describe-fks to allow for a database wide sync step rather per table
describe-table-indexes.

Implement for psotgres

* Fix formatting

* Add tests

* Update src/metabase/driver.clj



* Update src/metabase/driver.clj



* Address PR review

* Fix null schema check

---------

Co-authored-by: Case Nelson <case@metabase.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-12-09 23:49:01 +00:00
github-automation-metabase
b1bcbda7f7 docs - generate config file (#44444) (#51076)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-12-09 22:50:51 +00:00
github-automation-metabase
3d69c2bcbc note on public links (#51081) (#51083)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-12-09 22:17:25 +00:00
Raphael Krut-Landau
32effb1fde Fix browse models e2e tests (#51046) 2024-12-09 15:17:28 -06:00
github-automation-metabase
d3a75e4ef0 pin webhook tester to v1 (#51007) (#51009)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-12-09 08:00:12 -06:00
github-automation-metabase
20c3e508a2 Fix rollback to version 50 with null query_field values (#50982) (#50993)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-09 16:48:14 +03:00
metabase-bot[bot]
93a8ab510c rename team, acquire Denis :) (#50682) (#51033)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-12-09 09:12:19 +00:00
github-automation-metabase
4bff8d42d8 Show /api/search errors in Browse models and Browse metrics (#50713) (#50840)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-12-06 16:40:00 +00:00
github-automation-metabase
394e424bf9 Render negative values on PieChart (#50837) (#50989)
* fix pie chart ignores negative values

* fix incorrect handling of zero only values

* fix rebase

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-06 14:29:18 +00:00
github-automation-metabase
c086571821 Improve queue test and add more buffering (#50980) (#50981)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-06 13:10:55 +00:00
github-automation-metabase
1f1c61f55f Streamline embed flow when embedding is off (#50842) (#50979)
* Always show embed sharing option for admins (#50513)

* Always render the public link option

This is possible because metabase#50504

* Always render the embed option

* Fix unit tests

* Fix E2E tests

* Correct test semantic

* Hide Embed option for non-admins

* New Embed modal (#50580)

* Open "Compare options" in a new tab

* Add an external link icon to interactive embed option when it should

* Add disabled state to SDK

* Add a disable state to static and interactive embedding

* Add interactive embedding disabled state

* Implement disabled link

* Prepare folder for testing

* Fix tests and add SDK tests

* Add interactive embedding tests

* Correct test desribe block levels

* Add static embedding tests

* Add premium interactive embedding tests

* Add enterprise tests (EE without tokens)

* Fix the rest of the failed unit tests

* Update E2E tests

* Fix a case where OSS see disabled interactive embedding

This should be impossible as interactive embedding isn't available on
OSS, so we should not display the disabled state.

* Address review



* Address review

Co-Authored-by: Poom poom@poom.dev

---------



* Update Interactive Embedding Admin Settings page (#50693)

* Add a quick start link to interactive embedding settings page

* Update UTM tags for interactive embedding card

* Don't show interactive embedding option as enabled on OSS

* Fix unit tests

* Add a new test

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-12-06 11:30:19 +00:00
github-automation-metabase
ed4abaad6f fix scatter chart tooltip (#50889) (#50969)
* fix scatter chart tooltip shows irrelevant info

* remove outdated spec as we always show the tooltip_column setting

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-06 02:51:43 +00:00
github-automation-metabase
bcb8c01eda Add v0.50.35 to the list of releases (#50835) (#50966) 2024-12-06 01:38:18 +00:00
github-automation-metabase
5fd36b241d New and improved Examples collection (#50829) (#50968)
* fix the script, and add the new edn

* make the migrations run in the proper order

* it works (needs cleanup)

* remove broken binning

- These bins rely on fingerprinting for the custom Age column

- The fingerprinting for that custom column are not properly exported in
serialization, hence do not get loaded into metabase, causing binning by
Age to fail.

* cleanup / linting

* cleanup

* update migration test ids to test

* realign test name to check for to see if sample content was created

* remove Product collection + move Examples into root

* update collection_ids for the content too

* remove click behavior for 'Revenue goal for this quarter'

* Apply suggestions from code review



* for the sample collection is_sample should be true

* Drop CreateInternalUserNoOp

* typo

* update migration comments

* 2 small fixes

* fix data perms for example coll

* add a comment so we don't have 2 blank lines in a row

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-05 23:49:04 +00:00
github-automation-metabase
1cc98bca6c Make postgres enums not error when using :is-empty/:not-empty (#50914) (#50967)
Co-authored-by: William <william@metabase.com>
2024-12-05 23:22:37 +00:00
github-automation-metabase
278e0822ae sankey static viz integration test (#50793) (#50950)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-05 19:22:38 +00:00
github-automation-metabase
f387892cbc 🤖 backported "Use global e2e helper" to 52 (#50892)
* use global e2e helpers

* fix dashboard tests

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-12-05 12:01:24 -07:00
Jeff Bruemmer
6aad0b854f update env var docs (#50947) 2024-12-05 18:43:57 +00:00
github-automation-metabase
4bbc92122c fix(sdk): remove Error.captureStackTrace as it errors on firefox (#50773) (#50934)
firefox

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-05 17:43:24 +00:00
github-automation-metabase
fbea05994a [xlsx-export] Refactor postprocess namespace with perf/concat (#50170) (#50944)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-12-05 17:36:03 +00:00
github-automation-metabase
c12c23d9df Fix edge cases in New Search around model filtering (#50937) (#50939)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-05 16:36:37 +00:00
github-automation-metabase
dd36c4db4b Ensure user count is fetched within token status memoization (#50813) (#50819)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-12-05 15:11:46 +00:00
github-automation-metabase
109479dad5 Keep support for the old search engine name (#50876) (#50922)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-05 08:29:12 +00:00
github-automation-metabase
40c08c31bb Introduce the non-admin Onboarding Checklist (#50516) (#50794)
* Add new selectors

* Adjust the onboarding checklist for non-admins

* Add unit tests for non-admins

* Rename the control knob

* Fix the forgotten test

* Stop guarding the route for admins only

* Translate `alt` tags



* Translate `alt` tags



* Add e2e coverage for non-admins

* Refine selectors

* Improve the route guard

* Increase E2E coverage for route guards

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-12-05 08:10:53 +00:00
github-automation-metabase
1d9a3d049d Deprecate alert and pulse apis (#50453) (#50725)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-05 03:47:14 +00:00
github-automation-metabase
028a836e82 Loki flake: make delays configurable independently (#50806) (#50918)
* Add delay helper

* Remove delays in storybook

* Use skippable delay in ListField and SingleSelectListField

* Use skippable delay in ExplicitSize

* Remove waitTimeContext in storybook

* Remove waitTimeContext altogether

* Add documentation to delay

* Remove all context references in ExplicitSize

* Update flaky snapshots

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-12-05 01:38:59 +00:00
github-automation-metabase
80ccaeb237 fix: Qualify postgres enums outside public schema (#50900) (#50910)
Fixes: #50771

The new sync process failed to qualify enums outside public and
therefore failed to properly type them in database_type. This could
either result in matching the wrong type if there was a conflict or not
being typed as an enum.

Co-authored-by: Case Nelson <case@metabase.com>
2024-12-04 22:45:59 +00:00
github-automation-metabase
9787d0f088 Add v0.52.1 to the list of releases (#50906) (#50908) 2024-12-04 21:14:18 +00:00
github-automation-metabase
dfbda37934 Deserialize metrics as cards (#50807) (#50896)
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-12-04 20:52:05 +00:00
github-automation-metabase
28b4824e47 Add v0.51.7 to the list of releases (#50899) (#50904) 2024-12-04 20:51:52 +00:00
github-automation-metabase
d3cd56608a Trial Banner (#49344) (#50870)
* Add trial banner

* Use the semantic "warning" color for background

* Simplify the "reappearance" logic

* Refine the banner logic

- Pass the bare minimum information (expiry timestamp) to the `TrialBanner`
- Take timezones into account
- Introduce utilities
- Add unit tests

* Update the remaining tests

* Clean up

* Unbreak my `defsetting` 🎶

* Add comments

* Defer var assignment

* Fix failing tests 🤦

* Adjust the types in order to match `master`

* Move the logic up to the parent component

* Convert the `index` component to TS

* Fix typo in the JSDoc

* Fix another typo

* Make the return statement more readable

* Remove redundant test

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-12-04 20:15:08 +00:00
github-automation-metabase
ba9f08dd5b docs - verified content (#50885) (#50895)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-12-04 19:34:02 +00:00
github-automation-metabase
5bc320bbe7 Applying the underlying records filter to a query with a join display… (#50802) (#50886)
Applying the underlying records filter to a query with a join displays fields from the join

Co-authored-by: William <william@metabase.com>
2024-12-04 17:52:53 +00:00
github-automation-metabase
30c04a1dcc feat(sdk): add style and className to static dashboards (#50860) (#50884)
* add style and className to static dashboards

* unify props for static and interactive

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-04 17:43:31 +00:00
github-automation-metabase
ec681fc0bc Finish deprecating old search module namespace (#50852) (#50880)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-04 16:15:14 +00:00
github-automation-metabase
3e0978ad62 [search] replace experimental flag with engine choice (#50850) (#50872)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-04 14:04:46 +00:00
github-automation-metabase
af09c0199d [serdes] do not require prefix when passing entity ids to export (#50786) (#50865)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-12-04 12:48:19 +00:00
github-automation-metabase
73afba4194 fix persist model error email (#50843) (#50851)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-12-04 12:00:30 +00:00
github-automation-metabase
24c55f8a40 Add more logs for sending notification (#50836) (#50849)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-12-04 09:38:47 +00:00
github-automation-metabase
e48212bc34 feat(sdk): rename prop names to be clear and explicit (#50656) (#50817)
* rename onClose to onCancel

* rename questionHeight to drillThroughQuestionHeight

* rename showVisualizationSelector to withVisualizationSelector

* rename parameter value props

* doc updates for parameter values

* rename the chart type selector prop

* document the withChartTypeSelector prop

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-03 23:18:16 +00:00
github-automation-metabase
0f55159339 [Clean up] Hide clean up UI in sample collections (#50760) (#50810)
* hides clean up ui on sample collections

* commit unsaved changes

* pr feedback

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-12-03 23:04:46 +00:00
github-automation-metabase
22373dcd51 Onboarding checklist - misc. follow ups (#50579) (#50812)
* Fix the help link

* Update data stack image

* Fix the link appearance

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-12-03 22:37:54 +00:00
github-automation-metabase
c2a70fa7c4 docs - commands (#50784) (#50814)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-12-03 22:09:35 +00:00
Jeff Bruemmer
dc9440faad docs - 52 api and env var (#50750) 2024-12-03 16:58:46 -05:00
github-automation-metabase
46304b1b05 removing the 'can_write' requirement for selecting things via the question picker (#50783) (#50804)
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-12-03 21:24:10 +00:00
github-automation-metabase
9a7119d5af Update Translations for v52.1 (#50534) (#50799)
* Add new strings for v52.0

* Update translations

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
2024-12-03 20:01:40 +00:00
github-automation-metabase
e8a06bc519 Introduce the non-admin Onboarding Checklist (#50516) (#50794)
* Add new selectors

* Adjust the onboarding checklist for non-admins

* Add unit tests for non-admins

* Rename the control knob

* Fix the forgotten test

* Stop guarding the route for admins only

* Translate `alt` tags



* Translate `alt` tags



* Add e2e coverage for non-admins

* Refine selectors

* Improve the route guard

* Increase E2E coverage for route guards

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-12-03 19:36:39 +00:00
github-automation-metabase
005ee61971 Introduce the non-admin Onboarding Checklist (#50516) (#50794)
* Add new selectors

* Adjust the onboarding checklist for non-admins

* Add unit tests for non-admins

* Rename the control knob

* Fix the forgotten test

* Stop guarding the route for admins only

* Translate `alt` tags



* Translate `alt` tags



* Add e2e coverage for non-admins

* Refine selectors

* Improve the route guard

* Increase E2E coverage for route guards

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-12-03 19:36:21 +00:00
github-automation-metabase
401c471eb6 Partially fix flaky native e2e tests (#50710) (#50747)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-12-03 14:00:32 -05:00
github-automation-metabase
7a44bedfe6 Fix a (native-ace-editor) flake 30039 (#50774) (#50775)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-12-03 20:00:04 +01:00
github-automation-metabase
d8adb55990 fix(sdk): introduce .mb-wrapper to scope down our css (#50466) (#50791)
* add tests for css rules not scoped to the sdk

* fix(sdk): adds mb-wrapper class and scope css to it

* fix typo

* add .mb-wrapper to the body on storybook
diff --git a/.storybook/preview.tsx b/.storybook/preview.tsx
index 52a0d45125d..a4b3a86f4a5 100644
--- a/.storybook/preview.tsx
+++ b/.storybook/preview.tsx
@@ -42,15 +42,20 @@ const globalStyles = css`
 export const decorators = isEmbeddingSDK
   ? [] // No decorators for Embedding SDK stories, as we want to simulate real use cases
   : [
-      renderStory => (
-        <EmotionCacheProvider>
-          <ThemeProvider>
-            <Global styles={globalStyles} />
-            <CssVariables />
-            {renderStory()}
-          </ThemeProvider>
-        </EmotionCacheProvider>
-      ),
+      renderStory => {
+        if (!document.body.classList.contains("mb-wrapper")) {
+          document.body.classList.add("mb-wrapper");
+        }
+        return (
+          <EmotionCacheProvider>
+            <ThemeProvider>
+              <Global styles={globalStyles} />
+              <CssVariables />
+              {renderStory()}
+            </ThemeProvider>
+          </EmotionCacheProvider>
+        );
+      },
     ];

 function CssVariables() {

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-12-03 18:31:01 +00:00
github-automation-metabase
bffe2cb02f fix narrow ordinal line charts have no tooltip (#50715) (#50789)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-03 18:02:20 +00:00
github-automation-metabase
ad202c8bf3 Remove memoization of active user counts setting (#50779) (#50788)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-12-03 17:32:26 +00:00
github-automation-metabase
bd4b9c63fa Address feedback on Sankey (#50611) (#50787)
* do not show column selection error on empty datasets

* add more specs to chart-definition logic

* fix entry nodes tooltip and click behavior values

* fix nodes formatting

* do not show sankey data settings on dashboards

* do not initiallt open sankey data columns selects

* hide sankey tooltip on scroll

* drop incorrect types

* set sankey node limit

* prevent clicks on edges close tooltips on native sankey questions

* tweak copy

* update sankey spec according to fixes

* revert changed settings behavior

* fix unit specs

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-12-03 16:41:36 +00:00
github-automation-metabase
e8c63c322c Pivot Exports Can Handle nil in Breakout Col, and Multiple Cols of the Same Aggregation Type (#50672) (#50780)
* Pivot Exports Can Handle `nil` in Breakout Col, and Multiple Cols of the Same Aggregation Type

Fixes #50551

If a pivot table has several measures configured, they might both use the same kind of
aggregation (eg. 'sum'). Previously, this would lead to columns with the same name preventing the pivot-measures from
properly making it through the export post processing. Now, the correct aliased/deduped name is used and all columns
can be properly included in the pivot export.

Also fixes the case where a breakout column (pivot-row) contains `nil` values, which caused the pivot export to
fail. Now, all nil values are grouped and handled appropriately.

* when pivot is disabled, header should still be included

* min and max don't default to 0, add a test for the aggregations

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-12-03 15:31:30 +00:00
github-automation-metabase
1d19852bab Fix Quartz rescheduling with multiple triggers (#50707) (#50729)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-12-03 10:48:29 +00:00
github-automation-metabase
132bb1a268 feat(sdk): add withChartTypeSelector prop to InteractiveQuestion (#50664) (#50705)
* add withVisualizationSelector prop

* add tests

* add to docs

* use default layout in tests

* only use custom layout when needed

* make withChartTypeSelector false by default

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-03 10:16:36 +00:00
github-automation-metabase
5fcad73c9f fix(sdk): entity picker theming fixes (#50449) (#50590)
* use css variables for skeleton background color

* apply theme to folder color

* replace theme.white with themeColor

* use name of folder chevron color

* add background-inverse color mapping

* Revert "add background-inverse color mapping"

This reverts commit d0b546c583.

* avoid overriding folder chevron color in emotion

* use Mantine style overrides for NavLink

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-12-03 10:05:26 +00:00
github-automation-metabase
568aa2bcc7 Cache static assets without hash length restriction (#50703) (#50709)
* match against any hexadecimal bundle name

* add e2e tests skeleton

* Support display-name for ISO get-day-of-week exclusion expressions (#50606)

* Support display-name for ISO get-day-of-week exclusion expressions

Fixes #50574

* Fix light theme embeddings has different text colors (#50678)

* add cache-control tests

* support local runs

---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-12-03 09:53:18 +00:00
github-automation-metabase
9759a153a0 Make e2e tests of embedding and sql filters date-invariant (#50737) (#50767)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-12-03 05:21:26 +00:00
github-automation-metabase
768788653f update chart list (#50743) (#50755)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-12-02 22:28:32 +00:00
github-automation-metabase
e3f75b124e Add wzimrin to teams and github-slack-map (#50756) (#50757)
Co-authored-by: William <william@metabase.com>
2024-12-02 20:40:54 +00:00
github-automation-metabase
0e033e4ab7 docs: serialization clarification (#50601) (#50754)
* serialization clarification

* Apply suggestions from code review



---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-12-02 20:06:10 +00:00
github-automation-metabase
99a90504da Fix NPE on search model calculation, and improve testing story (#50717) (#50719)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-11-30 20:31:51 +00:00
github-automation-metabase
2ead76eda9 fix loki-update label is not removed after the job (#50607) (#50716)
* fix loki-update label is not removed after the job

* Update Loki Snapshots

* Update Loki Snapshots

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-11-30 04:27:47 +00:00
github-automation-metabase
1cc75c84f0 Include in-page-promo in embedding docs pages (#50359) (#50714)
Co-authored-by: Gustavo Saiani <gus@metabase.com>
2024-11-30 01:42:36 +00:00
github-automation-metabase
e9dc7f4d48 Migrate Slack channel picker field to use mantine autocomplete (#50661) (#50711)
* Migrate Slack channel picker field to use mantine autocomplete

* Fix limit size

* Fix limit size

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2024-11-29 22:03:27 +00:00
github-automation-metabase
bba6486a13 Fix custom expressions with multiple arguments - contains, does-not-contain, starts-with, ends-with (#50480) (#50708)
* adjustMultiArgOptions

* adjustMultiArgOptions

* Fix options

* Fix options

* Add a comment

* Fix tests

* Fix tests

* Add tests

* Tests

* Add tests

* Add tests

* Add tests

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-11-29 21:14:16 +00:00
github-automation-metabase
63414a34a1 feat(sdk): use string types for specifying entity ids instead of internal nanoid type (#50663) (#50704)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-11-29 20:51:48 +00:00
github-automation-metabase
308e1e6e22 🤖 backported "Improve Search Index clean-up and re-enable some tests" (#50701)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-11-29 22:33:50 +02:00
github-automation-metabase
83eb6cb980 Add v0.51.6 to the list of releases (#50640) (#50699)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-11-29 17:52:09 +00:00
github-automation-metabase
017fbe9a2f Extra Search Rankers for exact matches and things you own (#50684) (#50695)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-11-29 16:51:08 +00:00
github-automation-metabase
a784851a82 Old data picker in notebook for embedding (#50535) (#50697)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-11-29 16:33:33 +00:00
github-automation-metabase
1d917bc519 Fix light theme embeddings has different text colors (#50678) (#50688)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-11-29 15:37:29 +00:00
github-automation-metabase
ba244567a7 ci(sdk): remove unreliable loading indicator e2e for create question (#50555) (#50654)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-11-29 13:11:17 +00:00
github-automation-metabase
5db31666e2 Use separate indexes for different versions (#50620) (#50681)
This protects against us trying to read or write from an incompatible search index. In particular it prevents existing instances from being switched over to an incompatible table during an HA upgrade or downgrade.

~~It doesn't yet get rid of the needless re-initialization, but that will be a fast follow.~~ It breaks up the jobs so that we won't reindex on startup unless necessary.

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-11-29 11:03:39 +00:00
github-automation-metabase
65559cbc68 Take default Search weights from Stats (#50674) (#50680)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-11-29 09:57:32 +00:00
github-automation-metabase
51b66b3e2e Keep Search Index metadata sync'd via setting (#50581) (#50679)
See https://www.notion.so/metabase/Search-Index-Maintenance-14b69354c9018047b670cbba1c3be50d

This ensures that when one instance starts or finishes reindexing, the other instances pick up and switch to the same tables.

Note: this does not stop blowing away the currently active table on deployment yet, we need to have a notion of version for that first.

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-11-29 09:44:31 +00:00
github-automation-metabase
f581fe5645 Avoid renaming Search Index tables (#50573) (#50675)
This also avoids a brittle song and dance with non-authoritative atoms in the background. Now we juggle authoritative atoms all the time 😄

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-11-29 08:28:16 +00:00
github-automation-metabase
08fc48e9ea Enable underlying-records drill in table viz for multi-stage queries (#50556) (#50667)
* Enable underlying-records drill in table viz for multi-stage queries

* Fix e2e test

* Add tests for underyling-records drill for multi-stage queries

* Review feedback: filterv not-empty etc

* Review feedback: add a breakout-only query to drill-thru canned-queries

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2024-11-28 23:10:05 +00:00
github-automation-metabase
ebea9a221d Fix slack post recurrence field label (#50666) (#50671)
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2024-11-28 23:06:11 +00:00
github-automation-metabase
331a887c87 Sankey polish (#50550) (#50637)
* do not show column selection error on empty datasets

* persist default sankey column settings when saving

* add more specs to chart-definition logic

* more specs

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-11-28 14:05:35 +00:00
github-automation-metabase
a4a2a0017c update bigquery and netty (#50588) (#50617)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-11-28 08:06:23 +00:00
github-automation-metabase
21de14c27b Fix CSV upload when materialized views are present (#50557) (#50587)
Fixes https://github.com/metabase/metabase/issues/50501

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-11-28 07:50:03 +00:00
github-automation-metabase
c8296d4779 Table Column Ordering Should Not Prevent Pivot Exports (#50599) (#50610)
* Table Column Ordering Should Not Prevent Pivot Exports

Prior, when viz-settings existed for table column ordering, or if some columns were hidden in a regular table viz, the
pivot export could fail.

Now, if a pivot table is being exported, the table column sorting is properly ignored and the pivot export should work.

* address feedback

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-11-28 03:32:36 +00:00
github-automation-metabase
803732fe18 Fix issue with cypress config for e2e cross version tests (#50592) (#50597)
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2024-11-27 20:18:42 +00:00
github-automation-metabase
9af0d46dda feat(sdk): make tooltips themeable (#50457) (#50596)
* add background-inverse color mapping

* add tooltip themes

* tooltip theming

* apply to echarts tooltip

* update tooltip default color

* update tooltip defaults

* add sdk color mapping

* add additional theme colors

* add echarts tooltip story

* add loki tests

* remove background-inverse theme color option

* add to docs

* use ChartTooltipRoot for story and update loki snapshot

* update secondaryTextColor docstring

* fix unit tests

Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-11-27 19:20:59 +00:00
github-automation-metabase
8ae59fc04b fix: snowflake allow setting schema to use (#50528) (#50544)
Fixes: #50422

Although we passed additional-options through subname in url parameters
to DriverManager, we were also passing `:schema nil` as connection property.

Co-authored-by: Case Nelson <case@metabase.com>
2024-11-27 18:28:05 +00:00
github-automation-metabase
793f81809d docs - notes on transparent embeds (#50377) (#50578)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-11-27 15:00:48 +00:00
github-automation-metabase
3bce97fb01 fix(sdk): make modals use the correct portal (#50565) (#50570)
---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-11-27 13:42:47 +00:00
github-automation-metabase
ce1db0bab6 feat(sdk): Add cross-version e2e tests using a published SDK package (#50423) (#50572)
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2024-11-27 12:48:12 +00:00
github-automation-metabase
0aa4246b90 Basic test for search reindexing (#50560) (#50568)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-11-27 12:24:42 +00:00
github-automation-metabase
0617f36829 [Databricks] Add catalog validation into can-connect? implementation (#50468) (#50561)
* Add catalog validation in can-connect? implementation

* Remove redundant let

* Adjust description

* Update modules/drivers/databricks/src/metabase/driver/databricks.clj



---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-11-27 10:49:42 +00:00
github-automation-metabase
125ce1acbf Enable New Search by default (#50520) (#50554)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-11-27 07:44:39 +00:00
github-automation-metabase
0adadc9ad1 Send separate events for CSV appending and replacing (#50525) (#50553)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-11-27 06:49:29 +00:00
github-automation-metabase
77b70d05a2 🤖 backported "temporarily hiding group into other" (#50549)
* temporarily hiding group into other (#50511)

* temporarily hiding group into other

* hide group into other

* remove assertions related to group into other

* Update Loki Snapshots

---------

Co-authored-by: Metabase Automation <github-automation@metabase.com>

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-11-27 04:28:47 +00:00
github-automation-metabase
0341bf3e33 docs - add expressions to list (#50473) (#50540)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-11-27 03:20:32 +00:00
github-automation-metabase
df24b09171 Adding .png version of no_results.svg to fix #49012 (#50426) (#50547)
* Adding .png version of no_results.svg to fix #49012

* Adjusting text color to  to match existing color scheme

* Removing old unused no results assets; adding new png version of no_results.svg at matching resolution to pulse_no_results@2x.png

* Fixing namespace import cycle

Co-authored-by: Tyler Plude <tsplude@gmail.com>
2024-11-26 23:46:03 +00:00
github-automation-metabase
885905ebe5 🤖 backported "remove pivot-grouping row and columns in tandem" (#50530)
* remove pivot-grouping row and columns in tandem (#50476)

* remove pivot-grouping row and columns in tandem

* add pivot card scalar test for csvs and xlsx.

* improve test feedback

* add a 'todo' for pivoted json exports

* indent

* tap tap tap

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
2024-11-26 22:57:09 +00:00
github-automation-metabase
e56676bdd8 🤖 backported "Pivot Export Aggregations Improved and Won't Error" (#50532)
* Pivot Export Aggregations Improved and Won't Error (#50380)

* Pivot Export Aggregations Improved and Won't Error

Fixes #50207

WIP

- Totals now have appropriate aggregation implementation
- Totals for different row and column partial paths could collide before (eg. if a pivot-col value was equal to the
- measure idx), now the paths are unique and will not collide, causing errors

* add a test

* multiple measures need to have the correct order in each row

* clean up, add some comments explaining totals paths

* fix tests

* add test to show add-rows working correctly after :rows-part :cols-part added

* tap tap tap

---------

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
2024-11-26 22:17:51 +00:00
github-automation-metabase
127ab0be5d docs - Sankey (#50524) (#50539)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-11-26 22:10:48 +00:00
github-automation-metabase
6a1de543ac 🤖 backported "Fix embedding test build" (#50543)
* Fix embedding test build (#50542)

* kick ci

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-11-26 14:58:59 -07:00
1713 changed files with 84803 additions and 62140 deletions

View File

@@ -128,10 +128,12 @@
clojure.core.async/to-chan!
clojure.core.async/to-chan!!
metabase.channel.core/send!
metabase.models.notification/create-notification!
metabase.driver.sql-jdbc.execute/execute-prepared-statement!
metabase.models.notification/create-notification!
metabase.pulse.send/send-pulse!
metabase.query-processor.store/store-database!
;; Safe in tests, where we typically use a private, temporary index per thread.
metabase.search.core/reindex!
metabase.util/run-count!
next.jdbc/execute!}}
@@ -342,9 +344,8 @@
metabase.query-analysis.failure-map}
metabase.related #{metabase.related}
metabase.sample-data #{metabase.sample-data}
metabase.search #{metabase.search
;; deprecating naked metabase.search namespace in favor of this.
metabase.search.core
metabase.search #{metabase.search.core
;; Need to expose this submodule, to break circular dependencies with models.
metabase.search.spec}
metabase.server #{metabase.server
metabase.server.handler

View File

@@ -21,6 +21,7 @@
database-enable-actions
deprecation-notice-version
dismissed-custom-dashboard-toast
dismissed-onboarding-sidebar-link
email-configured?
email-from-address
email-from-name
@@ -161,6 +162,7 @@
token-features
token-status
toucan-name
trial-banner-dismissal-timestamp
uncached-setting
user-visibility
version

View File

@@ -35,6 +35,7 @@ runs:
["dashboard-cards", {} ],
["dashboard-filters", {} ],
["dashboard-filters-2", {} ],
["dashboard-filters-matrix", {} ],
["embedding", {} ],
["embedding-sdk", { context: "embedding-sdk" } ],
["filters", {} ],
@@ -51,6 +52,7 @@ runs:
["question-reproductions", {} ],
["search", {}],
["sharing", {} ],
["stats", {} ],
["visualizations-charts", {} ],
["visualizations-tabular", {} ],
["oss-subset", { edition: 'oss', context: "special" } ],

View File

@@ -90,7 +90,7 @@ runs:
if ${{ inputs.webhook }}; then
echo -e "${Y}Starting webhook test container..." &&
docker run -d -p 9080:8080/tcp tarampampam/webhook-tester serve --create-session 00000000-0000-0000-0000-000000000000 &&
docker run -d -p 9080:8080/tcp tarampampam/webhook-tester:1.1.0 serve --create-session 00000000-0000-0000-0000-000000000000 &&
while ! nc -z localhost 9080; do sleep 1; done &&
echo -e "${G}Webhook tester is up and running!"
fi

View File

@@ -5,9 +5,9 @@
files:
# migrations related files
'resources/migrations/**':
- team:core-backend-components
- team:core-workflows
'src/metabase/db/custom_migrations.clj':
- team:core-backend-components
- team:core-workflows
options:
ignore_draft: true

17
.github/team.json vendored
View File

@@ -12,7 +12,9 @@
"metamben",
"lbrdnk",
"appleby",
"uladzimirdev"
"uladzimirdev",
"wzimrin",
"ericnormand"
]
},
{
@@ -24,16 +26,18 @@
"name": "Embedding",
"label": ".Team/Embedding",
"projectUrl": "https://github.com/orgs/metabase/projects/88/views/1",
"members": ["WiNloSt", "deniskaber", "oisincoveney", "npretto", "heypoom"]
"members": ["WiNloSt", "oisincoveney", "npretto", "heypoom"]
},
{
"name": "BEC",
"label": ".Team/BackendComponents",
"name": "Workflows",
"label": ".Team/Workflows",
"projectUrl": "https://github.com/orgs/metabase/projects/50/views/1",
"members": [
"qnkhuat",
"piranha",
"crisptrutski"
"crisptrutski",
"deniskaber",
"wotbrew"
]
},
{
@@ -56,7 +60,8 @@
"alxnddr",
"kulyk",
"adam-james-v",
"tsplude"
"tsplude",
"lorem--ipsum"
]
},
{

View File

@@ -154,6 +154,7 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: be-tests
java-version: "${{ matrix.java-version }}"
# Depending on which files changed, we might either have to build static-viz
# from scratch or download the previously built artifact
- name: Build static-viz frontend
@@ -194,9 +195,9 @@ jobs:
fail-on-error: false
be-tests-stub:
needs: [be-tests]
needs: [files-changed, static-viz-files-changed, be-tests]
if: |
!cancelled() &&
always() &&
github.event.pull_request.draft == false && needs.be-tests.result == 'skipped'
runs-on: ubuntu-22.04
name: be-tests-java-${{ matrix.java-version }}-${{ matrix.edition }}

View File

@@ -1,18 +0,0 @@
name: Lint doc Markdown links
on:
push:
paths:
- docs/**
pull_request:
paths:
- docs/**
jobs:
markdown-link-check:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Lint doc links
run: yarn run docs-lint-links

View File

@@ -144,13 +144,16 @@ jobs:
MB_DATABRICKS_TEST_HTTP_PATH: ${{ secrets.MB_DATABRICKS_JDBC_TEST_HTTP_PATH }}
MB_DATABRICKS_TEST_TOKEN: ${{ secrets.MB_DATABRICKS_JDBC_TEST_TOKEN }}
MB_DATABRICKS_TEST_CATALOG: 'metabase_ci'
MB_DATABRICKS_TEST_CLIENT_ID: ${{ secrets.MB_DATABRICKS_JDBC_TEST_CLIENT_ID }}
MB_DATABRICKS_TEST_OAUTH_SECRET: ${{ secrets.MB_DATABRICKS_JDBC_TEST_OAUTH_SECRET }}
steps:
- uses: actions/checkout@v4
- name: Test Databricks driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-databricks-ee'
test-args: ":exclude-tags '[:mb/once]'"
test-args: >-
:only-tags [:mb/driver-tests]
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()

View File

@@ -0,0 +1,250 @@
name: E2E Cross-version Component Tests for Embedding SDK
on:
push:
branches:
- "release-**"
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
branches:
- "release-**"
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref && github.ref || github.run_id }}
cancel-in-progress: true
jobs:
files-changed:
name: Check which files changed
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
e2e_all: ${{ steps.changes.outputs.e2e_all }}
steps:
- uses: actions/checkout@v4
- name: Test which files changed
uses: dorny/paths-filter@v3.0.0
id: changes
with:
token: ${{ github.token }}
filters: .github/file-paths.yaml
# if this is a test on a release branch, we need to check the build requirements
get-build-requirements:
if: |
!cancelled()
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
java_version: ${{ fromJson(steps.dependencies.outputs.result).java_version }}
node_version: ${{ fromJson(steps.dependencies.outputs.result).node_version }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get build dependencies
uses: actions/github-script@v7
id: dependencies
with:
script: | # js
const {
getBuildRequirements,
getVersionFromReleaseBranch,
} = require('${{ github.workspace }}/release/dist/index.cjs');
const targetBranchName = '${{ github.base_ref || github.ref }}';
const version = getVersionFromReleaseBranch(targetBranchName);
const requirements = getBuildRequirements(version);
return {
java_version: requirements.java,
node_version: requirements.node,
};
build:
needs: [files-changed, get-build-requirements]
if: |
!cancelled() &&
github.event.pull_request.draft == false
runs-on: ubuntu-22.04
timeout-minutes: 25
env:
MB_EDITION: ee
INTERACTIVE: false
# make sure that builds on release branches get licenses, because we use them for releases
SKIP_LICENSES: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
with:
node-version: "${{ needs.get-build-requirements.outputs.node_version }}"
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: uberjar
java-version: "${{ needs.get-build-requirements.outputs.java_version || 11 }}"
- name: Build uberjar with ./bin/build.sh
run: ./bin/build.sh
- name: Prepare uberjar artifact
uses: ./.github/actions/prepare-uberjar-artifact
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
resolve-sdk-version:
if: |
!cancelled()
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
sdk_version: ${{ fromJson(steps.dependencies.outputs.result).sdk_version }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get latest SDK release for this branch
uses: actions/github-script@v7
id: dependencies
with:
script: | # js
const { getSdkVersionFromReleaseBranchName } = require('${{ github.workspace }}/release/dist/index.cjs');
const branchName = '${{ github.base_ref || github.ref }}';
const sdk_version = await getSdkVersionFromReleaseBranchName({
github,
owner: context.repo.owner,
repo: context.repo.repo,
branchName,
});
return {
sdk_version,
};
e2e-tests:
needs: [get-build-requirements, build, resolve-sdk-version]
if: |
!cancelled() && needs.build.result == 'success'
runs-on: ubuntu-22.04
timeout-minutes: 45
name: e2e-tests-embedding-sdk
env:
MB_EDITION: ee
DISPLAY: ""
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
steps:
- uses: actions/checkout@v4
- name: Prepare Docker containers
uses: ./.github/actions/e2e-prepare-containers
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# Needed to omit newly added tests for functionality that is not yet released
- name: Sparse checkout tests from SDK release commit
uses: actions/checkout@v4
with:
ref: embedding-sdk-${{ needs.resolve-sdk-version.outputs.sdk_version }}
path: sdk-release-e2e
sparse-checkout: e2e
- name: Move tests from the release commit into the repo
run: |
rm -rf ./e2e/support/helpers/*
mv ./sdk-release-e2e/e2e/support/helpers/* ./e2e/support/helpers
rm -rf ./e2e/test-component/*
mv ./sdk-release-e2e/e2e/test-component/* ./e2e/test-component
shell: bash
- name: Retrieve uberjar artifact for ee
uses: actions/download-artifact@v4
with:
name: metabase-ee-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
- name: Get the version info
run: |
jar xf target/uberjar/metabase.jar version.properties
mv version.properties resources/
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare JDK ${{ needs.get-build-requirements.outputs.java_version || 11 }}
uses: actions/setup-java@v4
with:
java-version: ${{ needs.get-build-requirements.outputs.java_version || 11 }}
distribution: "temurin"
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Install Embedding SDK package v${{ needs.resolve-sdk-version.outputs.sdk_version }}
run: yarn add @metabase/embedding-sdk-react@${{ needs.resolve-sdk-version.outputs.sdk_version }}
- name: Run E2E tests for Embedding SDK
run: yarn run test-cypress-run-component-sdk --browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit
output-name: e2e-embedding-sdk
bucket: ${{ vars.AWS_S3_TEST_RESULTS_BUCKET }}
aws-access-key-id: ${{ secrets.AWS_TEST_RESULTS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-recording-embedding-sdk-cross-version
path: |
./cypress
./logs/test.log
if-no-files-found: ignore
- name: Publish Summary
if: failure()
uses: actions/github-script@v7
with:
script: | #js
const {
parseReport,
formatSummary
} = require("./.github/scripts/handle-mochawesome-report.js");
const report = parseReport();
const summary = formatSummary(report);
await core.summary.addRaw(summary).write();
e2e-tests-skipped-stub:
needs: [e2e-tests]
if: |
!cancelled() &&
needs.e2e-tests.result == 'skipped'
runs-on: ubuntu-22.04
timeout-minutes: 5
name: e2e-component-tests-embedding-sdk-cross-version
steps:
- run: |
echo "Didn't run due to conditional filtering"

View File

@@ -32,7 +32,7 @@ jobs:
get-build-requirements:
if: |
!cancelled() &&
contains(github.ref, 'release-x')
contains(github.base_ref || github.ref, 'release-x')
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
@@ -53,7 +53,7 @@ jobs:
getBuildRequirements,
getVersionFromReleaseBranch,
} = require('${{ github.workspace }}/release/dist/index.cjs');
const targetBranchName = '${{ github.base_ref }}';
const targetBranchName = '${{ github.base_ref || github.ref }}';
const version = getVersionFromReleaseBranch(targetBranchName);
const requirements = getBuildRequirements(version);

View File

@@ -0,0 +1,97 @@
name: E2E Matrix Builder
on:
workflow_call:
inputs:
chunks:
required: true
type: number
default: 30
outputs:
matrix:
value: ${{ jobs.build-matrix.outputs.matrix }}
jobs:
build-matrix:
runs-on: ubuntu-22.04
timeout-minutes: 5
outputs:
matrix: ${{ steps.matrix.outputs.config }}
steps:
- uses: actions/setup-node@v3
with:
node-version: '20.x'
- uses: actions/checkout@v4
with:
sparse-checkout: e2e
- name: get test file names
id: test-files
shell: bash
run: |
echo "::set-output name=filenames::$(find e2e/test/scenarios -name '*.cy.spec.*' | tr '\n' ',')"
- uses: actions/github-script@v7
id: matrix
with:
script: | # js
const chunk = (arr, size) => {
const chunks = [];
const n = Math.ceil(arr.length / size);
for (let i = 0; i < n; i++) {
chunks.push(arr.slice(i * size, (i + 1) * size));
}
return chunks;
};
const java = 21;
const defaultRunner = "ubuntu-22.04";
// these are special and shouldn't be chunked out arbitrarily
const blacklist = [
"/embedding-sdk/",
"/cross-version/"
];
const defaultOptions = {
"java-version": java,
runner: defaultRunner,
specs: "./e2e/test/scenarios/**/*.cy.spec.*",
edition: "ee",
};
const specialTests = [
{ name: "embedding-sdk", specs: "./e2e/test/scenarios/embedding-sdk/**.cy.spec.*" },
{ name: "oss-subset", edition: 'oss', tags: "@OSS" },
{ name: "slow", tags: "@slow+-@flaky" },
{ name: "mongo", tags: "@mongo" },
];
const fileNames = "${{ steps.test-files.outputs.filenames }}"
.split(",")
.filter(Boolean)
.filter(testPath => !blacklist.some(blacklisted => testPath.includes(blacklisted)));
const fileCount = fileNames.length;
// subtract the special tests since they all get their own runners
const chunkSize = fileCount / (Number('${{ inputs.chunks }}') - specialTests.length);
const chunkedFiles = chunk(fileNames, chunkSize);
const regularTests = chunkedFiles.map((files, index) => ({
name: `e2e-group-${index + 1}`,
specs: files.join(","),
tags: '',
}));
const testSets = [...regularTests, ...specialTests];
const config = testSets.map((options) => ({
...defaultOptions,
...options,
}));
console.log("matrix config", config);
core.setOutput("config", JSON.stringify({ include: config }));

155
.github/workflows/e2e-test.yml vendored Normal file
View File

@@ -0,0 +1,155 @@
name: E2E Test
run-name: E2E Test - ${{ inputs.name }}
on:
workflow_call:
inputs:
name:
required: true
type: string
edition: # oss | ee
required: false
type: string
default: ee
specs:
required: false
default: ./e2e/test/scenarios/**/*.cy.spec.*
type: string
tags:
required: false
type: string
runner:
required: false
type: string
default: ubuntu-22.04
jobs:
e2e-tests:
runs-on: ${{ inputs.runner }}
timeout-minutes: 45
name: e2e-tests-${{ inputs.name }}-${{ inputs.edition }}
env:
MB_EDITION: ${{ inputs.edition }}
DISPLAY: ""
QA_DB_ENABLED: true
PR_NUMBER: ${{ github.event.pull_request.number || '' }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
HASH: ${{ github.event.pull_request.head.sha || github.sha }}-${{ github.run_attempt }}
JOB_NAME: ${{ inputs.name }}
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
MB_SNOWPLOW_AVAILABLE: true
MB_SNOWPLOW_URL: "http://localhost:9090" # Snowplow micro
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
CYPRESS_QA_DB_MONGO: ${{ inputs.name == 'mongo' }}
CYPRESS_IS_EMBEDDING_SDK: ${{ inputs.name == 'embedding-sdk' }}
mongo: ${{ inputs.name == 'mongo' }}
postgres: ${{ inputs.name != 'mongo' }}
mysql: ${{ inputs.name != 'mongo' }}
openldap: ${{ contains(inputs.specs, 'ldap') }}
maildev: true
webhook: true
steps:
- uses: actions/checkout@v4
- name: Prepare Docker containers
uses: ./.github/actions/e2e-prepare-containers
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
maildev: true
openldap: ${{ env.openldap }}
postgres: ${{ env.postgres }}
mysql: ${{ env.mysql }}
mongo: ${{ env.mongo }}
webhook: ${{ env.webhook }}
- name: Run Embedding SDK Storybook
if: inputs.name == 'embedding-sdk'
uses: ./.github/actions/run-embedding-sdk-storybook
- name: Retrieve uberjar artifact for ${{ inputs.edition }}
uses: actions/download-artifact@v4
with:
name: metabase-${{ inputs.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
- name: Get the version info
run: |
jar xf target/uberjar/metabase.jar version.properties
mv version.properties resources/
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare JDK 21
uses: actions/setup-java@v4
with:
java-version: 21
distribution: "temurin"
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Run Snowplow micro
uses: ./.github/actions/run-snowplow-micro
- name: Run EE Cypress tests on ${{ inputs.name }}
if: ${{ !inputs.tags }}
shell: bash
run: |
yarn run test-cypress-run \
--env grepTags="-@slow+-@mongo+-@flaky+-@OSS --@quarantine",grepOmitFiltered=true \
--spec '${{ inputs.specs }}' \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Run Tagged EE Cypress tests on ${{ inputs.name }}
if: ${{ inputs.tags }}
shell: bash
run: |
yarn run test-cypress-run \
--env grepTags="${{inputs.tags}} --@quarantine",grepOmitFiltered=true \
--spec '${{ inputs.specs }}' \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit
output-name: e2e-${{ inputs.name }}
bucket: ${{ vars.AWS_S3_TEST_RESULTS_BUCKET }}
aws-access-key-id: ${{ secrets.AWS_TEST_RESULTS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-recording-${{ inputs.name }}-${{ inputs.edition }}
path: |
./cypress
./logs/test.log
if-no-files-found: ignore
- name: Publish Summary
if: failure()
uses: actions/github-script@v7
with:
script: | #js
const {
parseReport,
formatSummary
} = require("./.github/scripts/handle-mochawesome-report.js");
const report = parseReport();
const summary = formatSummary(report);
await core.summary.addRaw(summary).write();

View File

@@ -29,15 +29,9 @@ jobs:
filters: .github/file-paths.yaml
e2e-matrix-builder:
runs-on: ubuntu-22.04
timeout-minutes: 5
outputs:
matrix: ${{ steps.e2e-matrix.outputs.matrix }}
steps:
- uses: actions/checkout@v4
- name: Generate matrix for E2E tests
id: e2e-matrix
uses: ./.github/actions/build-e2e-matrix
uses: ./.github/workflows/e2e-matrix-builder.yml
with:
chunks: 50
# if this is a test on a release branch, we need to check the build requirements
get-build-requirements:
@@ -70,12 +64,12 @@ jobs:
node_version: requirements.node,
};
build:
needs: [files-changed, e2e-matrix-builder, get-build-requirements]
needs: [files-changed, get-build-requirements]
if: |
!cancelled() &&
github.event.pull_request.draft == false &&
needs.e2e-matrix-builder.result == 'success' &&
needs.files-changed.outputs.e2e_all == 'true'
runs-on: ubuntu-22.04
timeout-minutes: 25
@@ -107,180 +101,90 @@ jobs:
with:
name: metabase-${{ matrix.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
reset-e2e-test-comment:
if: ${{ github.event_name == 'pull_request' }}
runs-on: ubuntu-latest
timeout-minutes: 5
steps:
- name: Remove test results comment
uses: actions/github-script@v7
with:
script: | # js
const { owner, repo } = context.repo;
const { data: comments } = await github.rest.issues.listComments({
owner,
repo,
issue_number: context.issue.number,
}).catch(console.error);
if (!comments) {
return;
}
const comment = comments.find((comment) => comment.body.includes('## e2e tests failed on '));
if (comment) {
await github.rest.issues.deleteComment({
owner,
repo,
comment_id: comment.id,
});
}
e2e-tests:
name: ${{ matrix.name }}-${{ matrix.edition }}
uses: ./.github/workflows/e2e-test.yml
needs: [build, e2e-matrix-builder]
if: |
!cancelled() && needs.build.result == 'success'
runs-on: ${{ matrix.runner }}
timeout-minutes: 45
name: e2e-tests-${{ matrix.name }}-${{ matrix.edition }}
env:
MB_EDITION: ${{ matrix.edition }}
DISPLAY: ""
QA_DB_ENABLED: true
# Any env starting with `CYPRESS_` will be available to all Cypress tests via `Cypress.env()`
# Example: you can get `CYPRESS_FOO` with `Cypress.env("FOO")`
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }}
CYPRESS_PULL_REQUEST_ID: ${{ github.event.pull_request.number || '' }}
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.event.head.sha }}
MB_SNOWPLOW_AVAILABLE: true
MB_SNOWPLOW_URL: "http://localhost:9090" # Snowplow micro
TZ: US/Pacific # to make node match the instance tz
CYPRESS_CI: true
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.e2e-matrix-builder.outputs.matrix) }}
matrix: ${{ fromJson(needs.e2e-matrix-builder.outputs.matrix) }}
secrets: inherit
with:
name: ${{ matrix.name }}
edition: ${{ matrix.edition }}
specs: ${{ matrix.specs }}
tags: ${{ matrix.tags }}
runner: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v4
- name: Prepare Docker containers
uses: ./.github/actions/e2e-prepare-containers
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
maildev: true
openldap: ${{ startsWith(matrix.name, 'admin') }}
postgres: ${{ matrix.name != 'mongo'}}
mysql: ${{ matrix.name != 'mongo'}}
mongo: ${{ matrix.name == 'mongo'}}
webhook: true
- name: Retrieve uberjar artifact for ${{ matrix.edition }}
uses: actions/download-artifact@v4
with:
name: metabase-${{ matrix.edition }}-${{ github.event.pull_request.head.sha || github.sha }}-uberjar
- name: Get the version info
run: |
jar xf target/uberjar/metabase.jar version.properties
mv version.properties resources/
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
- name: Prepare JDK ${{ matrix.java-version }}
uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java-version }}
distribution: "temurin"
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Run Snowplow micro
uses: ./.github/actions/run-snowplow-micro
- name: Run OSS-specific Cypress tests
if: matrix.edition == 'oss' && github.event_name != 'schedule'
run: |
yarn run test-cypress-run \
--env grepTags=@OSS,grepOmitFiltered=true \
--spec './e2e/test/scenarios/**/*.cy.spec.(js|ts)' \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Run slow and resource-intensive Cypress tests
if: matrix.name == 'slow' && github.event_name != 'schedule'
run: |
yarn run test-cypress-run \
--env grepTags="@slow",grepOmitFiltered=true \
--spec './e2e/test/scenarios/**/*.cy.spec.(js|ts)' \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Run Flaky Cypress tests
if: matrix.name == 'flaky' && github.event_name != 'schedule'
run: |
yarn run test-cypress-run \
--env grepTags="@flaky --@quarantine",grepOmitFiltered=true \
--spec './e2e/test/scenarios/**/*.cy.spec.(js|ts)' \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Run EE Cypress tests on ${{ matrix.name }}
if: matrix.context == 'folder' && github.event_name != 'schedule'
run: |
yarn run test-cypress-run \
--env grepTags="-@slow+-@mongo+-@flaky --@quarantine",grepOmitFiltered=true \
--folder ${{ matrix.name }} \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Run E2E tests that depend on Mongo
if: matrix.name == 'mongo'
run: |
yarn run test-cypress-run \
--env grepTags="@mongo --@quarantine",grepOmitFiltered=true \
--spec './e2e/test/scenarios/**/*.cy.spec.(js|ts)' \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
env:
CYPRESS_QA_DB_MONGO: true
- name: Run Embedding SDK Storybook
if: matrix.context == 'embedding-sdk' && github.event_name != 'schedule'
uses: ./.github/actions/run-embedding-sdk-storybook
- name: Run E2E tests for Embedding SDK
if: matrix.context == 'embedding-sdk' && github.event_name != 'schedule'
run: |
yarn run test-cypress-run \
--env grepTags="-@slow+-@flaky --@quarantine",grepOmitFiltered=true \
--folder 'embedding-sdk' \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
env:
CYPRESS_IS_EMBEDDING_SDK: true
shell: bash
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit
output-name: e2e-${{ matrix.name }}
bucket: ${{ vars.AWS_S3_TEST_RESULTS_BUCKET }}
aws-access-key-id: ${{ secrets.AWS_TEST_RESULTS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
if: failure()
with:
name: cypress-recording-${{ matrix.name }}-${{ matrix.edition }}
path: |
./cypress
./logs/test.log
if-no-files-found: ignore
- name: Publish Summary
if: failure()
uses: actions/github-script@v7
with:
script: | #js
const {
parseReport,
formatSummary
} = require("./.github/scripts/handle-mochawesome-report.js");
const report = parseReport();
const summary = formatSummary(report);
await core.summary.addRaw(summary).write();
e2e-tests-skipped-stub:
needs: [e2e-tests, e2e-matrix-builder]
# run this separately to make it non-blocking
flaky-e2e-tests:
name: Flaky e2e Tests
uses: ./.github/workflows/e2e-test.yml
needs: build
if: |
!cancelled() &&
needs.e2e-tests.result == 'skipped'
runs-on: ${{ matrix.runner }}
!cancelled() && needs.build.result == 'success'
secrets: inherit
with:
name: Flaky
tags: "@flaky"
e2e-tests-result:
needs: [e2e-tests, flaky-e2e-tests]
runs-on: ubuntu-latest
timeout-minutes: 5
name: e2e-tests-${{ matrix.name }}-${{ matrix.edition }}
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.e2e-matrix-builder.outputs.matrix) }}
name: e2e-tests-result
if: always() && !cancelled()
env:
E2E_TESTS_RESULT: ${{ needs.e2e-tests.result }}
FLAKY_E2E_TESTS_RESULT: ${{ needs.flaky-e2e-tests.result }}
steps:
- run: |
- name: Stub
if: ${{ needs.e2e-tests.result == 'skipped' }}
run: |
echo "Didn't run due to conditional filtering"
- name: Test results
if: ${{ needs.e2e-tests.result != 'skipped' }}
run: | # sh
echo "E2E Tests: ${{ needs.e2e-tests.result }}"
echo "Flaky E2E Tests: ${{ needs.flaky-e2e-tests.result }}"
if [ "${{ needs.e2e-tests.result }}" != "success" ]; then
echo "E2E Tests failed"
exit 1
fi
pr-env:
needs: [build]

View File

@@ -123,3 +123,43 @@ jobs:
m2-cache-key: "cljs"
- name: Run frontend timezones tests
run: yarn run test-timezones
fe-tests-result:
needs:
- fe-lint
- fe-type-check
- fe-tests-unit
- fe-tests-timezones
if: always() && !cancelled()
runs-on: ubuntu-latest
timeout-minutes: 5
env:
needs: ${{ toJson(needs) }}
steps:
- name: Check frontend job status
uses: actions/github-script@v7
env:
needs: ${{ toJson(needs) }}
with:
script: | # js
const needs = JSON.parse(process.env.needs);
const jobs = Object.entries(needs).map(
([jobName, jobValues]) => ({
name: jobName,
result: jobValues.result
}));
// are all jobs skipped or successful?
if (jobs.every(job => (job.result === 'skipped' || job.result === 'success'))) {
console.log('All jobs are skipped or successful');
process.exit(0);
}
// otherwise, something failed
console.log('Some frontend jobs failed');
jobs.forEach((job) => {
if (job.result !== 'success') {
console.log(`${job.name} - ${job.result}`);
}
});
process.exit(1);

32
.github/workflows/links.yml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Links
on:
repository_dispatch:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0"
jobs:
linkChecker:
runs-on: ubuntu-latest
permissions:
issues: write # required for peter-evans/create-issue-from-file
steps:
- uses: actions/checkout@v4
- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@v2
with:
fail: false
args: docs --config ./.lychee/config.toml --verbose --no-progress
format: markdown
- name: Create Issue From File
if: steps.lychee.outputs.exit_code != 0
uses: peter-evans/create-issue-from-file@v5
with:
title: Link Checker Report
content-filepath: ./.lychee/out.md
labels: "Type:Documentation"
assignees: jeff-bruemmer

View File

@@ -61,9 +61,9 @@ jobs:
with:
github-token: ${{secrets.METABASE_AUTOMATION_USER_TOKEN}}
script: |
github.issues.removeLabel({
github.rest.issues.removeLabel({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
name: 'loki-update'
})
});

View File

@@ -210,12 +210,16 @@ jobs:
- name: Create a PR updating readme + published version, and changelog (using GitHub Metabase Automation account)
run: |
# TODO: Remove this step once github includes the new gh CLI version 2.65.0
eval "$(/home/linuxbrew/.linuxbrew/bin/brew shellenv)"
brew install gh
git checkout -b update-sdk-version-${{ env.sdk_version }}
git commit -a -m 'Update Readme version references and published npm version to ${{ env.sdk_version }}'
git push origin HEAD
gh pr create --base ${{ inputs.branch }}\
--assignee "${GITHUB_ACTOR}"\
--title "Update SDK version to ${{ env.sdk_version }}"\
--title "docs(sdk): Update SDK version to ${{ env.sdk_version }}"\
--body "Update Readme version references and published npm package version to ${{ env.sdk_version }}"
env:
GH_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
@@ -257,8 +261,8 @@ jobs:
# Please keep the value in sync with `inputs.branch`'s release branch
npm publish --tag ${{fromJson('{"master": "nightly", "release-x.51.x": "51-stable"}')[inputs.branch]}}
- name: Add `latest` tag to the latest release branch (`release-x.51.x`) deployment
if: ${{ inputs.branch == 'release-x.51.x' }}
- name: Add `latest` tag to the latest release branch (`release-x.52.x`) deployment
if: ${{ inputs.branch == 'release-x.52.x' }}
working-directory: sdk
run: |
npm dist-tag add @metabase/embedding-sdk-react@${{ env.sdk_version }} latest

View File

@@ -1,15 +1,18 @@
name: Update Release Log
run-name: Update Release Log ${{ inputs.version }}
run-name: Update Release Log ${{ inputs.version || github.ref_name }}
on:
push:
branches:
- release-x.*
tags:
- v*
workflow_dispatch:
inputs:
version:
description: 'Major Metabase version (e.g. 45, 52, 68)'
type: number
required: true
schedule:
- cron: '45 * * * *' # hourly
workflow_call:
inputs:
version:
@@ -21,11 +24,8 @@ jobs:
update-release-log:
runs-on: ubuntu-latest
timeout-minutes: 5
# don't run this workflow on a cron for forks
if: ${{ github.event_name != 'schedule' || github.repository == 'metabase/metabase' }}
env:
VERSION: ${{ (github.event_name == 'workflow_dispatch' || github.event_name == 'workflow_call')
&& inputs.version || vars.CURRENT_VERSION }}
# don't run this workflow for forks
if: ${{ github.event_name != 'push' || github.repository == 'metabase/metabase' }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
@@ -35,9 +35,37 @@ jobs:
aws-region: ${{ vars.AWS_REGION }}
- uses: actions/checkout@v4
with:
ref: master # this only works on master
fetch-depth: 0 # we want all branches and tags
- name: Install Dependencies
run: yarn --cwd release --frozen-lockfile && npm i -g tsx
- name: Build release scripts
run: yarn --cwd release build
- name: Get version number
uses: actions/github-script@v7
with:
script: | # js
const {
getVersionFromReleaseBranch,
getMajorVersion,
} = require('${{ github.workspace }}/release/dist/index.cjs');
console.log({ context });
// if the version is explicitly set, use that
if (context.payload?.inputs?.version) {
core.exportVariable('VERSION', context.payload.inputs.version);
return;
}
// otherwise, get the version from the release branch name
const branch = context.payload.ref;
const version = getVersionFromReleaseBranch(branch);
const majorVersion = getMajorVersion(version);
console.log({ branch, version, majorVersion });
core.exportVariable('VERSION', majorVersion);
- name: generate release Log
run: cd release && tsx ./src/release-log-run.ts $VERSION > v$VERSION.html
- name: generate release channel log

View File

@@ -472,78 +472,6 @@ jobs:
git config user.email github-actions@github.com
$GITHUB_WORKSPACE/release/reorder-tags.sh ${{ needs.check-version.outputs.ee }} ${{ inputs.commit }}
trigger-docs-update:
if: ${{ !inputs.auto }}
needs:
- push-tags
- check-version
runs-on: ubuntu-22.04
timeout-minutes: 10
permissions:
contents: write
pull-requests: write
env:
NEW_OSS_VERSION: ${{ needs.check-version.outputs.oss }}
NEW_EE_VERSION: ${{ needs.check-version.outputs.ee }}
GH_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
steps:
- uses: actions/github-script@v7
with:
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
script: | # js
await github.rest.repos.createDispatchEvent({
owner: '${{ github.repository_owner }}',
repo: '${{ secrets.DOCS_REPO }}',
event_type: 'trigger-docs-update',
client_payload: {
version: '${{ inputs.version }}'
}
});
- uses: actions/checkout@v4
with:
token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: update releases.md
uses: actions/github-script@v7
with:
github-token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
script: | # js
const fs = require('fs');
const releaseText = fs.readFileSync('./docs/releases.md', 'utf8');
const newReleaseText = releaseText
.replace(
/## Metabase Enterprise Edition releases\n\n/,
`## Metabase Enterprise Edition releases\n\n- [${process.env.NEW_EE_VERSION}](https://github.com/metabase/metabase/releases/tag/${process.env.NEW_EE_VERSION})\n`
)
.replace(
/## Metabase Open Source Edition releases\n\n/,
`## Metabase Open Source Edition releases\n\n- [${process.env.NEW_OSS_VERSION}](https://github.com/metabase/metabase/releases/tag/${process.env.NEW_OSS_VERSION})\n`
);
fs.writeFileSync('./docs/releases.md', newReleaseText);
- name: commit and push updates
run: | # bash
git config --global user.email "metabase-bot@metabase.com"
git config --global user.name "Metabase bot"
git checkout -b docs-add-$NEW_OSS_VERSION
cd docs/
git add releases.md
git commit -m "Add $NEW_OSS_VERSION to the list of releases"
git push origin docs-add-$NEW_OSS_VERSION --force
- name: open pr with updates
run: | # bash
gh pr create --fill \
--body "Like it says on the tin 😁" \
--label "Type:Documentation" \
--label "backport" \
--reviewer "jeff-bruemmer" \
--assignee "jeff-bruemmer"
trigger-cloud-issues:
if: ${{ !inputs.auto }}
needs: push-tags

1
.gitignore vendored
View File

@@ -21,6 +21,7 @@
/*.trace.db
/.babel_cache
/.env
/.envrc
/.lein-env
/.lein-failures
/.lein-plugins

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 88 KiB

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 60 KiB

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 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: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 79 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: 82 KiB

After

Width:  |  Height:  |  Size: 82 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: 73 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 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: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 69 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: 67 KiB

After

Width:  |  Height:  |  Size: 67 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 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: 82 KiB

After

Width:  |  Height:  |  Size: 82 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 68 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 75 KiB

After

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 79 KiB

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 73 KiB

After

Width:  |  Height:  |  Size: 73 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

After

Width:  |  Height:  |  Size: 82 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: 72 KiB

After

Width:  |  Height:  |  Size: 72 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 72 KiB

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 70 KiB

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 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: 69 KiB

After

Width:  |  Height:  |  Size: 69 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: 18 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 19 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: 26 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 95 KiB

1
.lychee/config.toml Normal file
View File

@@ -0,0 +1 @@
accept = ["200..=204", "429"]

0
.lychee/out.md Normal file
View File

2
.lycheeignore Normal file
View File

@@ -0,0 +1,2 @@
http://localhost*
https://admin.google.com

105
.storybook-sdk/main.js Normal file
View File

@@ -0,0 +1,105 @@
const webpack = require("webpack");
const MiniCssExtractPlugin = require("mini-css-extract-plugin");
const appConfig = require("../webpack.config");
const fs = require("fs");
const path = require("path");
const {
isEmbeddingSdkPackageInstalled,
embeddingSdkVersion: EMBEDDING_SDK_VERSION,
} = resolveEmbeddingSdkPackage();
module.exports = {
core: {
builder: "webpack5",
},
stories: ["../enterprise/frontend/src/embedding-sdk/**/*.stories.tsx"],
staticDirs: ["../resources/frontend_client"],
addons: [
"@storybook/addon-essentials",
"@storybook/addon-links",
"@storybook/addon-a11y",
"@storybook/addon-interactions",
"storybook-addon-pseudo-states",
],
features: {
interactionsDebugger: true,
},
babel: () => {},
typescript: {
reactDocgen: "react-docgen-typescript-plugin",
},
webpackFinal: storybookConfig => ({
...storybookConfig,
plugins: [
...storybookConfig.plugins,
new MiniCssExtractPlugin(),
new webpack.ProvidePlugin({
Buffer: ["buffer", "Buffer"],
}),
new webpack.EnvironmentPlugin({
EMBEDDING_SDK_VERSION,
IS_EMBEDDING_SDK: true,
}),
],
module: {
...storybookConfig.module,
rules: [
...storybookConfig.module.rules.filter(
rule => !isCSSRule(rule) && !isSvgRule(rule),
),
...appConfig.module.rules.filter(
rule => isCSSRule(rule) || isSvgRule(rule),
),
],
},
resolve: {
...storybookConfig.resolve,
alias: {
...appConfig.resolve.alias,
...(isEmbeddingSdkPackageInstalled && {
// $ means that only exact "embedding-sdk" imports will be rerouted, all nested embedding-sdk/* will still be resolved locally
"embedding-sdk$": require.resolve("@metabase/embedding-sdk-react"),
}),
},
extensions: appConfig.resolve.extensions,
},
}),
};
const isCSSRule = rule => rule.test.toString() === "/\\.css$/";
const isSvgRule = rule => rule.test && rule.test?.test(".svg");
function resolveEmbeddingSdkPackage() {
let isEmbeddingSdkPackageInstalled = false;
let embeddingSdkVersion;
try {
const packagePath = require.resolve("@metabase/embedding-sdk-react");
if (packagePath.includes("node_modules")) {
isEmbeddingSdkPackageInstalled = true;
}
const packageJsonContent = fs.readFileSync(
path.join(packagePath, "package.json"),
"utf-8",
);
embeddingSdkVersion = JSON.stringify(
JSON.parse(packageJsonContent)?.version,
);
} catch (err) {
const sdkPackageTemplateJson = fs.readFileSync(
path.resolve(
"./enterprise/frontend/src/embedding-sdk/package.template.json",
),
"utf-8",
);
const sdkPackageTemplateJsonContent = JSON.parse(sdkPackageTemplateJson);
embeddingSdkVersion = JSON.stringify(sdkPackageTemplateJsonContent.version);
}
return {
isEmbeddingSdkPackageInstalled,
embeddingSdkVersion,
};
}

View File

@@ -0,0 +1,32 @@
import { GlobalTypes } from "@storybook/types";
// @ts-expect-error: See metabase/lib/delay
// This will skip the skippable delays in stories
window.METABASE_REMOVE_DELAYS = true;
import { storybookThemeOptions } from "embedding-sdk/test/storybook-themes";
export const parameters = {
actions: { argTypesRegex: "^on[A-Z].*" },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
};
export const decorators = []; // No decorators for Embedding SDK stories, as we want to simulate real use cases
export const globalTypes: GlobalTypes = {
sdkTheme: {
name: "SDK Theme",
description: "Global theme for sdk components",
defaultValue: "default",
toolbar: {
icon: "paintbrush",
items: storybookThemeOptions,
showName: true,
},
},
};

View File

@@ -4,27 +4,16 @@ const appConfig = require("../webpack.config");
const fs = require("fs");
const path = require("path");
const isEmbeddingSDK = process.env.IS_EMBEDDING_SDK === "true";
const mainAppStories = [
"../frontend/**/*.stories.mdx",
"../frontend/**/*.stories.@(js|jsx|ts|tsx)",
];
const embeddingSdkStories = [
"../enterprise/frontend/src/embedding-sdk/**/*.stories.tsx",
];
const {
isEmbeddingSdkPackageInstalled,
embeddingSdkVersion: EMBEDDING_SDK_VERSION,
} = resolveEmbeddingSdkPackage();
module.exports = {
core: {
builder: "webpack5",
},
stories: isEmbeddingSDK ? embeddingSdkStories : mainAppStories,
stories: mainAppStories,
staticDirs: ["../resources/frontend_client"],
addons: [
"@storybook/addon-essentials",
@@ -49,8 +38,7 @@ module.exports = {
Buffer: ["buffer", "Buffer"],
}),
new webpack.EnvironmentPlugin({
EMBEDDING_SDK_VERSION,
IS_EMBEDDING_SDK: isEmbeddingSDK,
IS_EMBEDDING_SDK: false,
}),
],
module: {
@@ -68,10 +56,6 @@ module.exports = {
...storybookConfig.resolve,
alias: {
...appConfig.resolve.alias,
...(isEmbeddingSdkPackageInstalled && {
// $ means that only exact "embedding-sdk" imports will be rerouted, all nested embedding-sdk/* will still be resolved locally
"embedding-sdk$": require.resolve("@metabase/embedding-sdk-react"),
}),
},
extensions: appConfig.resolve.extensions,
},
@@ -80,28 +64,3 @@ module.exports = {
const isCSSRule = rule => rule.test.toString() === "/\\.css$/";
const isSvgRule = rule => rule.test && rule.test?.test(".svg");
function resolveEmbeddingSdkPackage() {
let isEmbeddingSdkPackageInstalled = false;
let embeddingSdkVersion;
try {
embeddingSdkVersion =
require("@metabase/embedding-sdk-react/package.json").version;
isEmbeddingSdkPackageInstalled = true;
} catch (err) {
const sdkPackageTemplateJson = fs.readFileSync(
path.resolve(
"./enterprise/frontend/src/embedding-sdk/package.template.json",
),
"utf-8",
);
const sdkPackageTemplateJsonContent = JSON.parse(sdkPackageTemplateJson);
embeddingSdkVersion = JSON.stringify(sdkPackageTemplateJsonContent.version);
}
return {
isEmbeddingSdkPackageInstalled,
embeddingSdkVersion,
};
}

View File

@@ -1,14 +1,14 @@
import React from "react";
import { ThemeProvider } from "metabase/ui";
const isEmbeddingSDK = process.env.IS_EMBEDDING_SDK === "true";
// @ts-expect-error: See metabase/lib/delay
// This will skip the skippable delays in stories
window.METABASE_REMOVE_DELAYS = true;
if (!isEmbeddingSDK) {
require("metabase/css/core/index.css");
require("metabase/css/vendor.css");
require("metabase/css/index.module.css");
require("metabase/lib/dayjs");
}
require("metabase/css/core/index.css");
require("metabase/css/vendor.css");
require("metabase/css/index.module.css");
require("metabase/lib/dayjs");
import { EmotionCacheProvider } from "metabase/styled-components/components/EmotionCacheProvider";
import { getMetabaseCssVariables } from "metabase/styled-components/theme/css-variables";
@@ -39,19 +39,22 @@ const globalStyles = css`
${baseStyle}
`;
export const decorators = isEmbeddingSDK
? [] // No decorators for Embedding SDK stories, as we want to simulate real use cases
: [
renderStory => (
<EmotionCacheProvider>
<ThemeProvider>
<Global styles={globalStyles} />
<CssVariables />
{renderStory()}
</ThemeProvider>
</EmotionCacheProvider>
),
];
export const decorators = [
renderStory => {
if (!document.body.classList.contains("mb-wrapper")) {
document.body.classList.add("mb-wrapper");
}
return (
<EmotionCacheProvider>
<ThemeProvider>
<Global styles={globalStyles} />
<CssVariables />
{renderStory()}
</ThemeProvider>
</EmotionCacheProvider>
);
},
];
function CssVariables() {
const theme = useTheme();

View File

@@ -5,7 +5,6 @@ const fs = require("fs");
const path = require("path");
const SDK_DIST_DIR_PATH = path.resolve("./resources/embedding-sdk/dist");
const SDK_PACKAGE_NAME = "@metabase/embedding-sdk-react";
/*
* This script replaces all custom aliases in Embedding SDK generated ".d.ts" files so that this imports could be resolved
@@ -14,12 +13,12 @@ const SDK_PACKAGE_NAME = "@metabase/embedding-sdk-react";
// this map should be synced with "tsconfig.sdk.json"
const REPLACES_MAP = {
"metabase-enterprise": `${SDK_PACKAGE_NAME}/dist/enterprise/frontend/src/metabase-enterprise`,
"metabase-lib": `${SDK_PACKAGE_NAME}/dist/frontend/src/metabase-lib`,
"metabase-types": `${SDK_PACKAGE_NAME}/dist/frontend/src/metabase-types`,
metabase: `${SDK_PACKAGE_NAME}/dist/frontend/src/metabase`,
"embedding-sdk": `${SDK_PACKAGE_NAME}/dist/enterprise/frontend/src/embedding-sdk`,
cljs: `${SDK_PACKAGE_NAME}/dist/target/cljs_release`,
"metabase-enterprise": "enterprise/frontend/src/metabase-enterprise",
"metabase-lib": "frontend/src/metabase-lib",
"metabase-types": "frontend/src/metabase-types",
metabase: "frontend/src/metabase",
"embedding-sdk": "enterprise/frontend/src/embedding-sdk",
cljs: "target/cljs_release",
};
const traverseFilesTree = dir => {
@@ -42,24 +41,30 @@ const traverseFilesTree = dir => {
}
};
const getRelativePath = (fromPath, toPath) => {
const relativePath = path.relative(path.dirname(fromPath), toPath);
return relativePath.startsWith(".") ? relativePath : "./" + relativePath;
};
const replaceAliasedImports = filePath => {
let fileContent = fs.readFileSync(filePath, { encoding: "utf8" });
Object.entries(REPLACES_MAP).forEach(([alias, replacement]) => {
Object.entries(REPLACES_MAP).forEach(([alias, targetPath]) => {
const relativePath = getRelativePath(
filePath,
path.join(SDK_DIST_DIR_PATH, targetPath),
);
fileContent = fileContent
// replaces "metabase-lib/foo" with "<sdk>/metabase-lib/foo"
.replaceAll(`from "${alias}/`, `from "${replacement}/`)
// replaces "metabase-lib" with "<sdk>/metabase-lib"
.replaceAll(`from "${alias}"`, `from "${replacement}"`)
.replaceAll(`import("${alias}`, `import("${replacement}`)
.replaceAll(`from "${alias}/`, `from "${relativePath}/`)
.replaceAll(`from "${alias}"`, `from "${relativePath}"`)
.replaceAll(`import("${alias}`, `import("${relativePath}`)
.replace(
// replace dynamic imports using alias, with possible relative paths - "../../" and "frontend/src/"
// import("(../)*(frontend/src/)*<alias>
new RegExp(
`import\\("(\\.\\.\/)*(frontend\/src\/)*${alias.replace("/", "\\/")}`,
"gi",
),
`import("${replacement}`,
`import("${relativePath}`,
);
});

View File

@@ -49,6 +49,7 @@
com.fasterxml.woodstox/woodstox-core {:mvn/version "6.6.1"} ; trans dep of commons-codec
com.h2database/h2 {:mvn/version "2.1.214"} ; embedded SQL database
com.gfredericks/test.chuck {:mvn/version "0.2.14"} ; generating strings from regex
com.mchange/c3p0 {:mvn/version "0.10.1"} ; DB connection pool
com.snowplowanalytics/snowplow-java-tracker
{:mvn/version "1.0.1" ; Snowplow analytics
:exclusions [com.fasterxml.jackson.core/jackson-databind]}
@@ -76,11 +77,11 @@
instaparse/instaparse {:mvn/version "1.4.12"} ; Make your own parser
junegunn/grouper {:mvn/version "0.1.1"} ; Batch processing helper
clj-commons/clj-yaml {:mvn/version "1.0.27"} ; Clojure wrapper for YAML library SnakeYAML
io.github.camsaul/toucan2 {:mvn/version "1.0.556"}
io.github.camsaul/toucan2 {:mvn/version "1.0.560"}
io.github.eerohele/pp {:git/tag "2024-01-04.60" ; super fast pretty-printing library
:git/sha "a428751"
:git/url "https://github.com/eerohele/pp"}
io.github.metabase/macaw {:mvn/version "0.2.24"} ; Parse native SQL queries
io.github.metabase/macaw {:mvn/version "0.2.25"} ; Parse native SQL queries
;; The 2.X line of Resilience4j requires Java 17, so we cannot upgrade this dependency until that is our minimum JVM version
io.github.resilience4j/resilience4j-retry {:mvn/version "1.7.1" #_"must be 1.7.1"} ; Support for retrying operations
io.prometheus/simpleclient_hotspot {:mvn/version "0.16.0"} ; prometheus jvm collector

View File

@@ -55,6 +55,7 @@
[clojure.test]
[dev.debug-qp :as debug-qp]
[dev.explain :as dev.explain]
[dev.memory :as dev.memory]
[dev.migrate :as dev.migrate]
[dev.model-tracking :as model-tracking]
[dev.render-png :as render-png]
@@ -109,6 +110,9 @@
migrate!
rollback!
migration-sql-by-id]
[dev.memory
with-memory-logging
measuring-thread-allocations]
[render-png
open-html
open-png-bytes

View File

@@ -19,8 +19,6 @@
(assert (.isThreadAllocatedMemorySupported mx-bean))
(.getThreadAllocatedBytes mx-bean thread-id)))
(set! *warn-on-reflection* true)
(defn mb-str
"Format bytes as megabytes"
[bytes]
@@ -42,11 +40,42 @@
(log/warnf "Allocated: %s" (mb-str (:allocations m#)))
(:result m#)))
(def ^{:dynamic true
:private true} *memory-log-level* -1)
(defn- used-mb
[]
(let [rt (Runtime/getRuntime)
mb (* 1024.0 1024.0)]
(/ (- (.totalMemory rt) (.freeMemory rt)) mb)))
(defn log-memory-usage
"Executes body-fn and logs memory usage before and after execution.
Returns the result of body-fn."
[body-fn context]
(binding [*memory-log-level* (inc *memory-log-level*)]
(let [indent (apply str (repeat *memory-log-level* " "))
before (used-mb)
print-stats (fn
([stats]
(log/infof "%s%s | Memory before:: %.2f MB "
indent context stats))
([before after]
(log/infof "%s%s | Memory after:: %.2f MB (delta: %.2f MB)"
indent context after (- after before))))
_ (print-stats before)
result (body-fn)
after (used-mb)
_ (print-stats before after)]
result)))
(defmacro with-memory-logging
"Executes body and logs memory usage before and after execution.
Returns the result of body."
[context & body]
`(log-memory-usage (fn [] ~@body) ~context))
(comment
;; almost correct, at least a constant error
(measuring-thread-allocations
(byte-array (* 1024 1024)))
;; => 1.028MB
;; => 1.028MB
;; => 1.028MB
)
(byte-array (* 1024 1024))))

View File

@@ -37,7 +37,7 @@
([direction & [version]]
(mdb/migrate! (mdb/data-source) direction version)
#_{:clj-kondo/ignore [:discouraged-var]}
(println "Migrated up. Latest migration:" (latest-migration))))
(println (format "Migrated %s. Latest migration: %s" (name direction) (latest-migration)))))
(defn- rollback-n-migrations!
[^Integer n]

View File

@@ -1,7 +1,7 @@
---
title: Contributing to Metabase
redirect_from:
- /docs/latest/contributing
- /docs/latest/developers-guide/contributing
---
# Contributing to Metabase
@@ -61,7 +61,7 @@ Once one or more people have started to work on a feature, it should be marked [
### E) Verification and merging
All PRs that involve more than an insignificant change should be reviewed. See our [Code Review Process](code-reviews.md).
All PRs that involve more than an insignificant change should be reviewed. See our [Code Review Process](./developers-guide/code-reviews.md).
If all goes well, the feature gets coded up, verified and then the pull request gets merged! High-fives all around.
@@ -95,7 +95,7 @@ By our definition, "Bugs" are situations where the program doesn't do what it wa
There are a lot of docs, which means keeping them up to date is hard. If you notice inconsistencies, errors, or outdated information, please help us keep them current!
Note that **we cannot accept translations for documentation at this time**. We support [in-app translations](../configuring-metabase/localization.md), and only support languages that have 100% coverage. But 1) the in-app text is orders of magnitude shorter than our docs, 2) it changes at a slower pace, and 3) we have a lot of people help out. We may consider supporting docs in multiple languages in the future, but for now we need to focus our resources on improving our existing documentation (and expanding it to include all of the new features we're adding).
Note that **we cannot accept translations for documentation at this time**. We support [in-app translations](./configuring-metabase/localization.md), and only support languages that have 100% coverage. But 1) the in-app text is orders of magnitude shorter than our docs, 2) it changes at a slower pace, and 3) we have a lot of people help out. We may consider supporting docs in multiple languages in the future, but for now we need to focus our resources on improving our existing documentation (and expanding it to include all of the new features we're adding).
### Working on features

View File

@@ -132,6 +132,7 @@ Metabase's reference documentation.
- [Data reference](./exploration-and-organization/data-model-reference.md)
- [Events and timelines](./exploration-and-organization/events-and-timelines.md)
- [X-rays](./exploration-and-organization/x-rays.md)
- [Content verification](./exploration-and-organization/content-verification.md)
### People
@@ -140,7 +141,8 @@ Metabase's reference documentation.
- [Managing people and groups](./people-and-groups/managing.md)
- [Password complexity](./people-and-groups/changing-password-complexity.md)
- [Session expiration](./people-and-groups/changing-session-expiration.md)
- [Google Sign-In or LDAP](./people-and-groups/google-and-ldap.md)
- [Google Sign-In](./people-and-groups/google-sign-in.md)
- [LDAP](./people-and-groups/ldap.md)
- [API keys](./people-and-groups/api-keys.md)
#### Paid SSO options
@@ -206,7 +208,7 @@ Metabase's reference documentation.
### Metabase API
- [Metabase API documentation](./api-documentation.md)
- [API tutorial](https://www.metabase.com/learn/metabase-basics/administration/administration-and-operation//metabase-api)
- [API tutorial](https://www.metabase.com/learn/metabase-basics/administration/administration-and-operation/metabase-api)
### Troubleshooting
@@ -262,7 +264,7 @@ We tweet stuff.
Follow us on GitHub.
### [List of releases](./releases.md)
### [List of releases](https://github.com/metabase/metabase/releases)
A list of all Metabase releases, including both the Enterprise Edition and the Open Source Edition.

View File

@@ -7,7 +7,7 @@ title: "Metabase API documentation"
_These reference files were generated from source comments by running:_
```
clojure -M:ee:run api-documentation
clojure -M:ee:doc api-documentation
```
## About the Metabase API
@@ -17,12 +17,16 @@ clojure -M:ee:run api-documentation
## API tutorial
Check out an introduction to the [Metabase API](https://www.metabase.com/learn/metabase-basics/administration/administration-and-operation//metabase-api).
Check out an introduction to the [Metabase API](https://www.metabase.com/learn/administration/metabase-api.html).
## API keys
Create keys to authenticate programmatic requests to your Metabase. See [API keys](./people-and-groups/api-keys.md).
## API changelog
For breaking changes, see the API [changelog](./developers-guide/api-changelog.md).
## API endpoints
_* indicates endpoints used for features available on [paid plans](https://www.metabase.com/pricing)._

View File

@@ -2,12 +2,16 @@
title: "Alert"
summary: |
/api/alert endpoints.
Deprecated: will soon be migrated to notification APIs.
---
# Alert
/api/alert endpoints.
Deprecated: will soon be migrated to notification APIs.
## `DELETE /api/alert/:id/subscription`
For users to unsubscribe themselves from the given alert.

View File

@@ -44,11 +44,11 @@ Invalidate cache entries.
- **`include`** All cache configuration overrides should invalidate cache too.
- **`database`** A database id.
- **`database`** A list of database ids.
- **`dashboard`** A dashboard id.
- **`dashboard`** A list of dashboard ids.
- **`question`** A question id.
- **`question`** A list of question ids.
## `PUT /api/cache/`

View File

@@ -208,7 +208,9 @@ Run the query associated with a Card, and return its results as a file in the sp
- **`parameters`** nullable value must be a valid JSON string.
- **`format_rows`** nullable boolean.
- **`pivot_results`** nullable value must be a valid boolean string ('true' or 'false').
- **`format_rows`** nullable value must be a valid boolean string ('true' or 'false').
## `POST /api/card/:card-id/refresh`

View File

@@ -223,10 +223,14 @@ Modify an existing Collection, including archiving or unarchiving it, or moving
## `PUT /api/collection/graph`
Do a batch update of Collections Permissions by passing in a modified graph.
Will overwrite parts of the graph that are present in the request, and leave the rest unchanged.
Do a batch update of Collections Permissions by passing in a modified graph. Will overwrite parts of the graph that
are present in the request, and leave the rest unchanged.
If the `skip_graph` query parameter is true, it will only return the current revision.
If the `force` query parameter is `true`, a `revision` number is not required. The provided graph will be persisted
as-is, and has the potential to clobber other writes that happened since the last read.
If the `skip_graph` query parameter is `true`, it will only return the current revision, not the entire permissions
graph.
You must be a superuser to do this.
@@ -234,11 +238,13 @@ You must be a superuser to do this.
- **`namespace`** nullable value must be a non-blank string.
- **`revision`** value must be an integer.
- **`revision`** nullable value must be an integer.
- **`groups`** map.
- **`skip_graph`** nullable value must be a valid boolean string ('true' or 'false').
- **`skip-graph`** nullable value must be a valid boolean string ('true' or 'false').
- **`force`** nullable value must be a valid boolean string ('true' or 'false').
---

View File

@@ -220,7 +220,9 @@ Run the query associated with a Saved Question (`Card`) in the context of a `Das
- **`parameters`** nullable value must be a valid JSON string.
- **`format_rows`** nullable boolean.
- **`format_rows`** nullable value must be a valid boolean string ('true' or 'false').
- **`pivot_results`** nullable value must be a valid boolean string ('true' or 'false').
- **`request-parameters`**

View File

@@ -30,7 +30,9 @@ Execute a query and download the result data as a file in the specified format.
- **`visualization_settings`** value must be a valid JSON string.
- **`format_rows`** nullable boolean.
- **`pivot_results`** nullable value must be a valid boolean string ('true' or 'false').
- **`format_rows`** nullable value must be a valid boolean string ('true' or 'false').
## `POST /api/dataset/native`

View File

@@ -24,6 +24,14 @@ Do a batch update of Application Permissions by passing a modified graph.
You must be a superuser to do this.
### PARAMS:
- **`skip-graph`** nullable value must be a valid boolean string ('true' or 'false').
- **`force`** nullable value must be a valid boolean string ('true' or 'false').
- **`body`** map.
---
[<< Back to API index](../../api-documentation.md)

View File

@@ -20,7 +20,7 @@ You must be a superuser to do this.
- **`moderated_item_id`** value must be an integer greater than zero.
- **`moderated_item_type`** enum of card, :card.
- **`moderated_item_type`** enum of card, :card, dashboard, :dashboard.
- **`status`** nullable nullable enum of verified.

View File

@@ -140,6 +140,8 @@ Like `GET /api/embed/card/query`, but returns the results as a file in the speci
- **`format_rows`** nullable boolean.
- **`pivot_results`** nullable boolean.
- **`query-params`**
## `GET /api/embed/dashboard/:token`
@@ -188,6 +190,8 @@ Fetch the results of running a Card belonging to a Dashboard using a JSON Web To
- **`format_rows`** nullable boolean.
- **`pivot_results`** nullable boolean.
- **`query-params`**
## `GET /api/embed/dashboard/:token/field/:field-id/remapping/:remapped-id`

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