Compare commits

...

1052 Commits

Author SHA1 Message Date
appleby
3179ef2efa backport: Support both name & field ref-based column keys in viz settings on read and upgrade on write (#46383) (#48243)
Fixes #48046

Manual backport of d3a515858a to fix customer escalation in

  Not renamed fields in a same table join inherit the renamed name in exports #48046.

Conflicts:
	e2e/test/scenarios/dashboard-filters/temporal-unit-parameters.cy.spec.js
	frontend/src/metabase/static-viz/lib/settings.ts
	frontend/src/metabase/visualizations/lib/settings/column.js
	frontend/src/metabase/visualizations/lib/utils.js
	frontend/src/metabase/visualizations/shared/settings/column.ts
	frontend/src/metabase/visualizations/visualizations/Table.unit.spec.js
	src/metabase/query_processor/streaming/xlsx.clj
2024-10-02 08:26:04 -07:00
github-automation-metabase
409c2a2760 🤖 backported "Future-proof CSV uploads from next HoneySQL upgrade" (#48233)
Co-authored-by: Chris Truter <chris@metabase.com>
2024-10-01 23:45:48 +00:00
github-automation-metabase
83c850daef 🤖 backported "Upload test fixes for drivers without auto mb-id" (#48221)
Co-authored-by: Chris Truter <chris@metabase.com>
2024-10-01 22:49:33 +00:00
github-automation-metabase
27a4a22939 🤖 backported "[QP] Don't attach :temporal-unit :default to every temporal clause" (#48172)
This was old logic to support certain drivers (eg. pre-JDBC Druid) and
isn't required for most. It's perfectly sound to filter or even break
out on a datetime column without bucketing.

Adds a new `:temporal/requires-default-unit` driver feature, and enables it only for the legacy Druid driver.

Fixes #47341

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-10-01 22:14:27 +00:00
github-automation-metabase
74f20cfff7 🤖 backported "Pivot Options are Properly Calculated for Questions based on Models with Joins" (#48164)
* Pivot Options are Properly Calculated for Questions based on Models with Joins (#47830)

Fixes 46575

Creating a Pivot Table Question that is based off of a model that has at least one column derived from a join failed
to display row totals.

This is because the pivot-options map was being mis-calculated; not all column indices were correctly found/passed in
to the :pivot-rows or :pivot-cols keys, causing the pivot query not to compute all necessary data.

Here, I just modify the :lib/source key of the columns whose source is a card (as determined by the existence of
:lib/card-id). The columns being checked will all have :source/breakout, which caused, in the issue's repro example,
the "NAME" column to be missed. If it instead has :lib/source :source/card, the logic inside
`lib/find-matching-column` works.

* include changes from #46594 that this backported changed relies on

---------

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-10-01 21:56:06 +00:00
github-automation-metabase
f061cfdb07 perf: Do fewer moderation_reviews queries when fetching recent views (#48169) (#48236)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-10-01 17:55:26 +00:00
metabase-bot[bot]
5afc6012e5 Fix timezone comparisons in failing execution stats test (#48204) (#48223)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-10-01 16:36:56 +00:00
github-automation-metabase
443487e715 fix: wrap Filter by this value in t (#48226) (#48229)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-10-01 14:53:53 +00:00
github-automation-metabase
50bf12a632 🤖 backported "updateSetting e2e typed helper" (#48196)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-10-01 15:08:55 +02:00
John Swanson
2cef6d1ca0 Backport: Require :encryption for string settings (#48067) (#48171)
* Require `:encryption` for string settings (#48067)

* Require `:encryption` for string settings

For settings that are not typed as JSON, CSV, or strings, encryption now
defaults to `:no` (*except* if you have
explicitly marked your setting as `:sensitive?` - these will default to
`:when-encryption-key-set`).

I went through all our settings and provided what I think are reasonable
values here. I tried to be conservative - when I wasn't sure whether a
stored setting was sensitive, I kept it as encrypted. For example, the
`ldap-port` setting is probably non-sensitive but theoretically someone
could be using a weird port for security-by-obscurity, so I kept that
encrypted.

* Change possible values for `:encryption`

`:maybe` was confusing: let's be more explicit that the value will be
encrypted `:when-encryption-key-set` to make it obvious what actually
turns encryption on and off.

* Don't encrypt `site-locale` (#47731)

* Don't encrypt `site-locale`

* Fix test for `site-locale`

The previous test required encryption. Theoretically the referenced
error just depends on the fact that something is logged during the
process of getting the value, so I reworked it to depend on that
directly rather than triggering it through an encryption key rotation.
2024-10-01 12:49:08 +00:00
github-automation-metabase
c54064ea07 Reset the dashboard parameter when setting the default value (#48089) (#48165)
* Reset the dashboard parameter when setting the default value

* Fix test for filter default

* Add test for setting parameters when editing the defaults

* Use plain dispatch



* Use cy.log instead of comments

* Use icon selector

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-09-27 15:25:01 +00:00
github-automation-metabase
9511087b31 Fix edge cases where uploads munged display names (#48149) (#48157)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-09-27 09:07:59 +00:00
github-automation-metabase
d65acc8fbf perf: Use vectors to iterate over all user permissions (#48025) (#48131)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-09-26 10:13:27 +00:00
github-automation-metabase
49d9a8d970 Bump redshift driver (#47957) (#48095)
Co-authored-by: Case Nelson <case@metabase.com>
2024-09-25 22:10:59 +00:00
github-automation-metabase
ce8671695b Pre fill non-sensitive user information during setup for hosted instances (#48019) (#48119)
* Pre-fill cloud user info from search params

* Autofocus password field for hosted instances

* Add tests

* Parse setup user info and store it immediatelly

* Autofocus password input field for hosted instances

* Add e2e reproduction

* Fix the user info

* Fix unit test

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-09-25 17:41:11 +00:00
github-automation-metabase
108a2aa0c0 [Permissions] PR Feedback for 47630 (#48116) (#48117)
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-09-25 16:57:36 +00:00
github-automation-metabase
8b8e13b437 🤖 backported "Reset filters in dashboard click action" (#48090)
* Reset filters in dashboard click action (#48075)

* Use default values for parameters in dashboard filters when used from click action

* Add test for setting non-specified parameters to default in dashboard accessed via click action

* Fix multiAutocomplete in tests

* Fix e2e tests

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-09-25 16:51:00 +00:00
github-automation-metabase
757b79b7a5 display warning that native query access is restricted if a table or schema is set to blocked (#47630) (#48113)
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-09-25 15:42:27 +00:00
github-automation-metabase
39e02261f4 Add v0.50.27 to the list of releases (#48102) (#48115)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-09-25 15:02:00 +00:00
github-automation-metabase
cffb532f8b docs - update notice for community drivers (#48111) (#48114)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-09-25 15:01:55 +00:00
github-automation-metabase
0de1341c12 [E2E] Remove the default-ee spec (#47162) (#48062)
* removes the default-ee snapshot in favor for a blockUserGroupPermissions util

* commit default-ee removal i forgot, replace default strings with undefined

* fix oopsie

* fixes failures for not removing enough permissions for tests in sandboxes.cy.spec.js

* rename var

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-09-25 09:09:05 -05:00
github-automation-metabase
8b9a8fc2d2 🤖 backported "Pivot Exports/Downloads Should Not include pivot-grouping or 'Extra' Rows" (#47979)
* Pivot Exports/Downloads Should Not include pivot-grouping or 'Extra' Rows (#47832)

* Pivot Exports/Downloads Should Not include pivot-grouping or 'Extra' Rows

Fixes 46561

When downloading a pivot table's data, a column 'pivot-grouping' is included as well as 'extra' rows that correspond
to various totals in the table.

This PR removes the pivot-grouping column and any of these 'extra' rows from the downloads/exports.

* fix xlsx

* Fix csv

* fix json

* add test and fix some failing tests

* fmt

* Update src/metabase/query_processor/streaming/csv.clj

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* static viz table renders filter out pivot-grouping

* address review feedback

* add some comments to try explain the changes

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* fix xlsx impl that I didn't completely backport properly at first

* pivot-grouping-key available even if not exporting as pivoted

---------

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
2024-09-24 12:08:17 +00:00
github-automation-metabase
fd5cc53beb Tweak some sheet around CSV uploads (#48000) (#48042)
Co-authored-by: Chris Truter <chris@metabase.com>
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-09-24 10:47:26 +00:00
github-automation-metabase
62e3ff4fe5 🤖 backported "Downgrade gh runner image for sqlserver 2017 job" (#48061)
* Downgrade gh runner image for sqlserver 2017 job (#48060)

* Serialization flake fixes

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
Co-authored-by: Chris Truter <chris@metabase.com>
2024-09-24 09:56:01 +00:00
github-automation-metabase
447368198b [E2E] Improve + Fix tests that use sandboxing (#46465) (#48045)
* fixes some tests where data permissions were overwriting sandboxing permissions, makes assertions in tests where sandboxing user is used but the test also passes if you were to sign in as the normal user, fixes one test that sandboxes the wrong table for the test

* do not push - wip changes

* add assertions to that network requests are provided sandboxed data, fix faulty test in dashboard-filters-source.cy.spec.js

* use helpers to clean up parts of pagination assertions

* rename assertDatasetIsSandboxed to assertDatasetReqIsSandboxed

* adds assertions on api response data

* clean up

* fix typo

* refactor helper to be easier to follow

* golfing

* pr feedback

* fix

* fix

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-09-22 10:32:12 +02:00
github-automation-metabase
f21708120a Add snowplow to e2e docs (#47765) (#48039)
* add snowplow mention to e2e docs

* tweak new snowplow doc page to be more in line with old section

* Update docs/developers-guide/e2e-tests.md



---------

Co-authored-by: Filip Hric <filip@filiphric.sk>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-09-20 10:53:17 +00:00
github-automation-metabase
ace848f153 Admin webapp owns the ui lib now (#48030) (#48031)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-09-19 21:06:57 +00:00
github-automation-metabase
5a933dc000 🤖 backported "update jspdf" (#47987)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-09-18 11:02:44 +00:00
github-automation-metabase
72eaa61956 🤖 backported "fix broken test about resizing column by readonly user" (#47921)
* fix broken test about resizing column by readonly user

* Update e2e/test/scenarios/question/saved.cy.spec.js



---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-09-18 10:59:44 +00:00
Nemanja Glumac
c1927516eb Fix text alignment for dashboard text card (#47540) (#47978)
Co-authored-by: amardatar <57144500+amardatar@users.noreply.github.com>
2024-09-17 19:20:20 +00:00
github-automation-metabase
2380076341 Add v0.50.26 to the list of releases (#47970) (#47974)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-09-17 16:05:52 +00:00
github-automation-metabase
fc1c9b8944 docs: make password resetting instructions more prominent (#47958) (#47973)
* make resetting instructions more prominent

* link

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-09-17 16:03:15 +00:00
github-automation-metabase
9d9c3632b2 fix: snowflake compile day trunc to timestamp_ltz (#47874) (#47959)
Fixes #47426

Date operations return values based on the timestamp offset rather than
the session/db timezone. Converting to `timestamp_ltz` first ensures
that we get predictable results.

In the test, it is important that database timezone matches
report_timezone so that post-processing gives proper results.

Co-authored-by: Case Nelson <case@metabase.com>
2024-09-17 14:16:54 +00:00
github-automation-metabase
5a65f46719 🤖 backported "fix: bigquery add null checks to result processing" (#47773)
* fix: bigquery add null checks to result processing

Fixes #47339

On the related issue there are different stacktraces indicating
likely sources of null pointer exceptions.

1. `.getNextPage` is likely returning a nil value. I was unable to reproduce this but one thing I did notice is that `hasNextPage` is recommended over checking `.getNextPageToken`. Added nil handling around `page` possibly being nil.

2. `cancel-chan` may be triggered before processing begins and such `execute-bigquery` would pass nil as a TableResult to the initial reducer. Testing if cancel-chan happens at just the right moment would be too flaky for CI testing but I was able to reproduce this locally and is fixed by the nil handling added.

3. `cancel-chan` may be triggered during query processing. This is covered by a test now.

* Check hasNextPage in test:

* Add test for null getNextPage

* Fix cljfmt

Co-authored-by: Case Nelson <case@metabase.com>
2024-09-16 13:01:57 -06:00
github-automation-metabase
e6f09d2245 Ensure :effective-type for columns from an aggregation in a card (#47936) (#47942)
* Ensure :effective-type for columns from an aggregation in a card

Fixes #47184

* Synchronize effective-type with the base-type on override

When :base-type in the column metadata is overridden with the :base-type in the field ref, set it as :effective-type
too.  If :effective-type is also set in the field ref, it wins.

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-09-16 19:15:44 +03:00
github-automation-metabase
808643ad3a 🤖 backported "Fix ordering by the accumulated column" (#47943)
* Fix ordering by the accumulated column (#47875)

* Skip databases not supporting implicit columns

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Tamás Benkő <tamas@metabase.com>
2024-09-16 16:09:43 +00:00
github-automation-metabase
ca3c7339db 🤖 backported "cleanup data reference tooltips" (#47898)
* cleanup data reference tooltips

* update test
# Conflicts:
#	frontend/src/metabase/components/ListItem/ListItem.styled.tsx

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-09-13 16:51:52 -06:00
github-automation-metabase
df1ca3dbb4 Store ::nil markers in CachedMetadataProvider for failed lookups (#47589) (#47646)
* Fix typo in MetadataProvider docstring

* Fix typo in caching-test: s/Second/Third/

* Store ::nil markers in CachedMetadataProvider for failed lookups

Store ::nil markers in CachedMetadataProvider for any ids for which the wrapped/uncached upstream provider fails to return
metadatas. This prevents repeatedly querying the uncached-provider for ids that don't exist.

The downside is that if the uncached-provider suddenly starts returning metadata for an id that previously did not
exist, we won't pick up on it, but the assumption here is that this is no different / worse than cache invalidation
for existing ids that happen to change after we cache them.

* PR suggestion: remove unnecessary test assertion

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2024-09-13 16:10:19 -06:00
github-automation-metabase
75d05792eb Revert to non-truncating mbql.u/unique-name-generator in annotate-native-cols (#47866) (#47934)
* Rollback to legacy unique-name-generator in annotate-native-cols

* Add native query long column alias test to nested queries tests

* Add native query long column alias test to dataset api tests

* Add native query long column alias test to models e2e tests

* Move limit into inner native query

* PR suggestion: simplify lambda argslist



* PR suggestion: remove unnecessary mt/with-temp-copy-of-db

* Tweak test name

---------

Closes #47584

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-09-13 22:09:40 +00:00
github-automation-metabase
ead7313ee0 🤖 backported "Controlled upgrades" (#47923)
* Initial commit of controlled upgrades

- new setting upgrade-threshold (`MB_UPGRADE_THRESHOLD`)
  number 0-100
- conditionally removing latest from upgrade checks

AS OF RIGHT NOW IT ALWAYS REMOVES the latest.
Should help FE make this optional

* dumb mistake

* handle no latest version info

* implement and basic test

* More tests, refactor name

* more tests

* cljfmt does not like commas in source code.

* Just move site-uuid to the declaration and don't declare it

nothing is sacred in the settings order. no reason. i think i was just
trying to minimize the diff, which a dumb and ignoble goal.

* add context strings

* update unit tests

* use display version

* Have upgrade threshold include current major version

hopefully helps rotate people from early to late, and late to early
across major versions. Idea from sanya and quite nice!

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
# Conflicts:
#	frontend/src/metabase/admin/settings/components/SettingsUpdatesForm/VersionUpdateNotice/VersionUpdateNotice.tsx

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-09-13 14:21:45 -06:00
github-automation-metabase
e44b48d02c docs: multiline export (#47925) (#47928)
* multiline export

* Update docs/installation-and-operation/serialization.md



---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-09-13 16:05:07 +00:00
github-automation-metabase
6974e99917 docs: progress bar docs (#47792) (#47927)
* progress bar

* rephrase

* better word

* streamline the article

* rename image

* Apply suggestions from code review



---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-09-13 15:59:50 +00:00
github-automation-metabase
e8f59d3dd0 correctly parse collection id, update path state on handleNewDashboard (#47318) (#47924)
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-09-13 15:57:32 +00:00
github-automation-metabase
050fd6e077 [serdes] field name is only unique in combination with parent_id (#47808) (#47909)
so we need to account for that in serialization paths, storage
paths and when exporting/importing foreign keys

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-09-13 09:21:04 +00:00
Nicolò Pretto
e7db719b63 backport of update prettier so we can use satisfies (#47894)
* update prettier

* run prettier on files
2024-09-12 17:03:14 +00:00
github-automation-metabase
a3a1046dcc Enable named aggregations in offset expressions (#47783) (#47826)
Fixes #47735

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-09-12 17:58:55 +03:00
github-automation-metabase
56020f5703 store user_parameter_value asynchronously (#47719) (#47856)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-09-12 11:11:25 +03:00
github-automation-metabase
154a371644 fix static visualizations dashcard settings merging (#47789) (#47836)
* fix static visualizations dashcard settings merging

* cleanup, fix types

* drop an empty file

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-09-11 14:42:04 -04:00
github-automation-metabase
6184f69b9c 🤖 backported "API endpoint dox generation should resolve schemas from the registry " (#47654)
* API endpoint dox generation should resolve schemas from the registry #46799

* Update Kondo config

* Fix formatting

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2024-09-11 09:58:56 -07:00
github-automation-metabase
f3bbfd44bb remove firebolt link (#47852) (#47853)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-09-11 14:28:01 +00:00
github-automation-metabase
b67756c272 🤖 backported "Improve Clear cache button text and question refresh button tooltip" (#47321) 2024-09-11 08:59:41 -04:00
github-automation-metabase
e4f2ab575c Add v0.50.25 to the list of releases (#47822) (#47831)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-09-10 23:54:57 +00:00
github-automation-metabase
473a7cab8a Tidy up CSV encoding detection (#47809) (#47813)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-09-10 18:03:33 +00:00
github-automation-metabase
64480c8985 🤖 backported "Handle non UTF-8 encoded CSV uploads" (#47807)
* Basic character set handling (#47799)

Co-authored-by: Chris Truter <chris@metabase.com>
2024-09-10 16:00:02 +00:00
github-automation-metabase
a80451d3a2 🤖 backported "fix(admin/performance): Ensure that adding or removing default values doesn't make cache policy form count as dirty" (#47352) 2024-09-10 11:33:39 -04:00
github-automation-metabase
24134a00f1 🤖 backported "fix(admin/performance): Don't show tooltip on default policy" (#47476) 2024-09-10 11:31:13 -04:00
github-automation-metabase
5588e939e9 [QP] Correctly handle :lib/internal-remap columns in :result_metadata (#47587) (#47788)
Fixes #45938.

Remapping is handled at the top level of the query, and should be
ignored for inner queries. This PR hides it from `results_metadata` on
source queries.

It also fixes the interaction with `large-int-id` logic to make big
integers JS-safe.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-09-09 21:17:53 +00:00
github-automation-metabase
705c7781f9 perf: Use more efficient query validation when the argument is valid (#47724) (#47787)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-09-09 21:09:21 +00:00
github-automation-metabase
286688f8f3 Convey cancelation info when the client closes the connection (#47740) (#47781)
Fixes #4755

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-09-09 18:18:48 +00:00
github-automation-metabase
c882eef87e 🤖 backported "Entity id translation analytics" (#47640)
* fixup: Static embed dashboard and question endpoints (#47270)

* entity id translation + tests

* add api level test

* simplify definition of eid-table->model + add test

* update tests to take keywords

* improve comment

* generate the eid-table->model map

* delete now-obsolete test

* make it work in oss

* put the resulting response into a key, so we can add more information later

* formatting

* use model names without the model/ prefix as keys

* Creates list of `api/model->db-model`

- update keys for util/entity_id request
- update shape of util/entity_id response
- add test for not-found eids

* formatting

* Respond to code review feedback

* entity-ids work on /embed/{card,dashboard}* routes

* make entity id translation work for all tokens

* Merge branch 'static-embed-dashboard-and-question-endpoints' of github.com:metabase/metabase into static-embed-dashboard-and-question-endpoints

* massage schema. add tons of tests

* decode more eids

* test alignment

* don't require ns inside of itself :think:

* make the test functions to create tokens better

* bring back `dashboard-url`

---------

Co-authored-by: Oisin Coveney <oisin@metabase.com>

* fixup more tests

* fix a test in api.embed-test

* fix typo

* fix dox typo

* api.embed-test is passing

* Add backport resolution script

* perf: Miscellaneous card rendering improvements (#47679) (#47691)

* perf: Optimize reading rows into vectors in JDBC driver

* perf: Use direct interop when computing with-time-zone-same-instant

Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>

* Catch Errors in Download process and only write error message (#47482) (#47696)

* walk the error to remove any visualization settings

Thanks Dan for the patch, this approach is nice because it doesn't require changing all 3 streaming-response-writer
implementations (json csv and xlsx). It keeps behaviour basically the same, but just cleans up the output to not
include potentially sensitive column/dataset details.

* add a test that confirms json/csv errors are cleaned

* walk the error to remove any visualization settings

Thanks Dan for the patch, this approach is nice because it doesn't require changing all 3 streaming-response-writer
implementations (json csv and xlsx). It keeps behaviour basically the same, but just cleans up the output to not
include potentially sensitive column/dataset details.

* add a test that confirms json/csv errors are cleaned

* fix dataset error test

* cljfmt

* try to be a little more surgical with what we take out of the error

* formatting again, oops

* pass export format, only modify the obj for file exports

In the case of errors being saved to files, the obj is a map with a :status :failed key assoc'd by the qp somewhere
along the way. The format-exception cond branch is not used in this case, so we can't rely on modifying
`format-exception` to just dissoc ex-data.

Instead, I've kept the obj modification, but it excludes the query and the preprocessed keys, which are the only 2
keys where we see :viz-settings. This doesn't eliminate the problem of needing to exclude other keys in the future,
but it does improve the surface area - the query and viz settings are the most likely candidates for holding
potentially sensitive info.

I'd prefer to stick with this solution, as we can get a fix for the security concern in quicker, and perhaps a
non-security bug can be opened regarding the most correct way to indicate errors to users whose downloads have failed.

* keep format-exception the same

* cleaner passing of export-format to write-error!

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>

* Revert "Hide upload config when data warehouse is attached" (#47611) (#47666)

The way this was implemented, it also hid the section for management
of uploaded CSV files.  Further, admins might want to intentionally
switch from uploading to the data warehouse provided by Metabase to
one of their own.

This reverts commit fbaf58ad03.

References: https://github.com/metabase/harbormaster/issues/5121
References: https://metaboat.slack.com/archives/C032LFJFANL/p1725296255637989
Co-authored-by: Dennis Schridde <63082+devurandom@users.noreply.github.com>

* Hide attached DWH database details (#47419)

== Goal ==

Hide attached DWH database details from anyone incl. admins:
* Do not show them in the UI
* Do not permit to change them
* Do not serialize them

The aim is that customers cannot gain access to (parts of) credentials,
and they cannot break a feature they are paying for by changing
connection details.

Database details are already generally excluded from H2 dump snapshots
(see `metabase.cmd.copy/*copy-h2-database-details*`), thus nothing
changes there.

== Implementation ==

The Metabase backend already contains provisions in the implementation
of `metabase.models.interface/to-json` for `:model/Database` to hide the
`details` of the database in HTTP responses, if the user lacks write
permission on the database.  We utilize this by adding an
`is_attached_dwh` column to the `database` table and rejecting
`metabase.models.interface/can-write?` when this flag is enabled.  In
the "admin" UI, we show a replacement text instead of the edit form when
the flag is set.  (It might be correct to show this whenever `details`
is absent.  See below for possible follow-up work.)

However, several sections of the frontend code expected the `details`
field to always be present.  In order to make `details` optional, as the
backend seems to handle it, we fix the respective code to treat this
case in the way that appears appropriate in the context.

== How to test ==

=== New behaviour ===

Setting the `is_attached_dwh` field hides the database details:

1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases.
   - In addition to the fields you would normally set, also set
     `is_attached_dwh: true`.
   - This also works when adding this flag to a database that previously
     did not have this flag set.
2. Start your Metabase instance.
3. Verify the database shows up in the "admin" section
   (`/admin/databases`).
4. Verify that clicking the database to see its details only reveals
   "This database cannot be modified."
5. Verify that responses from the backend do not include a `details`
   field for this database.

=== Original behaviour ===

Behaviour without setting the `is_attached_dwh` field is unchanged:

1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases.
   - Only set the fields you would normally set.  Do not set
     `is_attached_dwh` (or set it to `false`).
2. Start your Metabase instance.
3. Verify the database shows up in the "admin" section
   (`/admin/databases`).
4. Verify that clicking the database to see its details only reveal the
   regular edit form, showing connection fields like `host`, `user`,
   etc. with the values you configured.

== How this will be rolled out ==

1. Upgrade existing Metabase Cloud instances with data warehouse to a
   Metabase version that supports `is_attached_dwh`.
2. Set `is_attached_dwh` in the database section of the config file for
   Metabase Cloud instances with a data warehouse.

== Possible follow-up work ==

In https://github.com/metabase/metabase/issues/25715, absent
`database.details` was identified as a bug.  Since then, `details` was
made `NOT NULL` in the application database, so this bug can no longer
occur.  However, today backend responses can be missing the `details`
field, if the current user lacks write permission to the database
setting (see above).  Fully re-evaluating #25715 in this context is
outside the scope of this PR.

Closes: https://github.com/metabase/harbormaster/issues/5051
Backports: https://github.com/metabase/metabase/pull/47247
Backports: https://github.com/metabase/metabase/pull/47517
Backports: https://github.com/metabase/metabase/pull/47469
Backports: https://github.com/metabase/metabase/pull/47419
Co-authored-by: Dennis Schridde <63082+devurandom@users.noreply.github.com>

* Fix Transparent disabled state on mantine switch label (#47677) (#47718)

* make custom disabled state more specific than transparent style

* make it less nesty

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

* update docs (#47725)

* Support field remapping in pivot queries (#47592) (#47693)

* Support field remapping in pivot queries

* Generate breakouts without inversions

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* perf: Optimize some query processor functions (#47658) (#47716)

* perf: [metabase.util.performance] Faster mapv for small collections

* perf: Optimize some query processor functions

Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>

* 🤖 backported "recents updates to better support metrics" (#47141)

* recents updates to better support metrics (#47032)

* recents updates to better support metrics

allows updating metric views through the API
improves parent_collection calculation

* add 2 tests for metrics

* 🤖 backported "Entity id translation service"

---------

Co-authored-by: Bryan Maass <bryan.maass@gmail.com>

* fix: sqlserver handle uniqueidentifier uuids (#47544) (#47638)

* fix: sqlserver handle uniqueidentifier uuids

Fixes #46148

Include sqlserver in `uuid-type` handling as its `uniqueidentifier` type
stores uuids.

* Don't be so precise with varchar size

* Add seam for drivers to cast to text type

* Fix arg order

Co-authored-by: Case Nelson <case@metabase.com>

* Always allow localhost:* on CORS (#47663) (#47710)

* Always allow localhost:* on CORS

* Use `embedding-app-origin-sdk` method for the headers

* Fix BE code formatting

* Fix BE formatting

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <kelvin@metabase.com>

* 🤖 backported "Revert multiple inheritance with SnowflakeVariant" (#47695)

* Revert multiple inheritance with SnowflakeVariant (#47680)

* Revert multiple inheritance with SnowflakeVariant (#47680)

* CI

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>

* Entity id translation analytics (#47432)

* tracking entity id translation

* add total and more tests

* indentation

* realign the last test

* Backport fixups

* 🤖 backported "upgrade webpack to address security issue" (#47604)

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

* Hide attached DWH database details (#47419)

== Goal ==

Hide attached DWH database details from anyone incl. admins:
* Do not show them in the UI
* Do not permit to change them
* Do not serialize them

The aim is that customers cannot gain access to (parts of) credentials,
and they cannot break a feature they are paying for by changing
connection details.

Database details are already generally excluded from H2 dump snapshots
(see `metabase.cmd.copy/*copy-h2-database-details*`), thus nothing
changes there.

== Implementation ==

The Metabase backend already contains provisions in the implementation
of `metabase.models.interface/to-json` for `:model/Database` to hide the
`details` of the database in HTTP responses, if the user lacks write
permission on the database.  We utilize this by adding an
`is_attached_dwh` column to the `database` table and rejecting
`metabase.models.interface/can-write?` when this flag is enabled.  In
the "admin" UI, we show a replacement text instead of the edit form when
the flag is set.  (It might be correct to show this whenever `details`
is absent.  See below for possible follow-up work.)

However, several sections of the frontend code expected the `details`
field to always be present.  In order to make `details` optional, as the
backend seems to handle it, we fix the respective code to treat this
case in the way that appears appropriate in the context.

== How to test ==

=== New behaviour ===

Setting the `is_attached_dwh` field hides the database details:

1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases.
   - In addition to the fields you would normally set, also set
     `is_attached_dwh: true`.
   - This also works when adding this flag to a database that previously
     did not have this flag set.
2. Start your Metabase instance.
3. Verify the database shows up in the "admin" section
   (`/admin/databases`).
4. Verify that clicking the database to see its details only reveals
   "This database cannot be modified."
5. Verify that responses from the backend do not include a `details`
   field for this database.

=== Original behaviour ===

Behaviour without setting the `is_attached_dwh` field is unchanged:

1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases.
   - Only set the fields you would normally set.  Do not set
     `is_attached_dwh` (or set it to `false`).
2. Start your Metabase instance.
3. Verify the database shows up in the "admin" section
   (`/admin/databases`).
4. Verify that clicking the database to see its details only reveal the
   regular edit form, showing connection fields like `host`, `user`,
   etc. with the values you configured.

== How this will be rolled out ==

1. Upgrade existing Metabase Cloud instances with data warehouse to a
   Metabase version that supports `is_attached_dwh`.
2. Set `is_attached_dwh` in the database section of the config file for
   Metabase Cloud instances with a data warehouse.

== Possible follow-up work ==

In https://github.com/metabase/metabase/issues/25715, absent
`database.details` was identified as a bug.  Since then, `details` was
made `NOT NULL` in the application database, so this bug can no longer
occur.  However, today backend responses can be missing the `details`
field, if the current user lacks write permission to the database
setting (see above).  Fully re-evaluating #25715 in this context is
outside the scope of this PR.

Closes: https://github.com/metabase/harbormaster/issues/5051
Backports: https://github.com/metabase/metabase/pull/47247
Backports: https://github.com/metabase/metabase/pull/47517
Backports: https://github.com/metabase/metabase/pull/47469
Backports: https://github.com/metabase/metabase/pull/47419
Co-authored-by: Dennis Schridde <63082+devurandom@users.noreply.github.com>

* update docs (#47725)

* Support field remapping in pivot queries (#47592) (#47693)

* Support field remapping in pivot queries

* Generate breakouts without inversions

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>

* perf: Optimize some query processor functions (#47658) (#47716)

* perf: [metabase.util.performance] Faster mapv for small collections

* perf: Optimize some query processor functions

Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>

* fix: sqlserver handle uniqueidentifier uuids (#47544) (#47638)

* fix: sqlserver handle uniqueidentifier uuids

Fixes #46148

Include sqlserver in `uuid-type` handling as its `uniqueidentifier` type
stores uuids.

* Don't be so precise with varchar size

* Add seam for drivers to cast to text type

* Fix arg order

Co-authored-by: Case Nelson <case@metabase.com>

* Always allow localhost:* on CORS (#47663) (#47710)

* Always allow localhost:* on CORS

* Use `embedding-app-origin-sdk` method for the headers

* Fix BE code formatting

* Fix BE formatting

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <kelvin@metabase.com>

* 🤖 backported "Revert multiple inheritance with SnowflakeVariant" (#47695)

* Revert multiple inheritance with SnowflakeVariant (#47680)

* Revert multiple inheritance with SnowflakeVariant (#47680)

* CI

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>

* 🤖 backported "upgrade webpack to address security issue" (#47604)

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

---------

Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
Co-authored-by: Oisin Coveney <oisin@metabase.com>
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Dennis Schridde <63082+devurandom@users.noreply.github.com>
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Case Nelson <case@metabase.com>
Co-authored-by: Bryan <bryanl@metabase.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <kelvin@metabase.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-09-09 09:18:19 -06:00
github-automation-metabase
5044444cf5 [serdes] option to dump full stacktraces on errors (#47676) (#47720)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-09-09 10:33:02 +00:00
github-automation-metabase
4ccb37750b [serdes] api: better error when archive looks weird (#47721) (#47756)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-09-09 08:57:19 +00:00
github-automation-metabase
3b502f8eff Fix admin override for public actions (#47717) (#47742)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-09-06 22:30:43 +00:00
github-automation-metabase
753d3269d1 🤖 backported "Simplify backend Snowplow API in preparation for migrating stats ping to Snowplow" (#47739)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2024-09-06 22:14:24 +00:00
github-automation-metabase
f942c363a8 🤖 backported "Static embed dashboard and question endpoints" (#47430)
* fixup: Static embed dashboard and question endpoints (#47270)

* entity id translation + tests

* add api level test

* simplify definition of eid-table->model + add test

* update tests to take keywords

* improve comment

* generate the eid-table->model map

* delete now-obsolete test

* make it work in oss

* put the resulting response into a key, so we can add more information later

* formatting

* use model names without the model/ prefix as keys

* Creates list of `api/model->db-model`

- update keys for util/entity_id request
- update shape of util/entity_id response
- add test for not-found eids

* formatting

* Respond to code review feedback

* entity-ids work on /embed/{card,dashboard}* routes

* make entity id translation work for all tokens

* Merge branch 'static-embed-dashboard-and-question-endpoints' of github.com:metabase/metabase into static-embed-dashboard-and-question-endpoints

* massage schema. add tons of tests

* decode more eids

* test alignment

* don't require ns inside of itself :think:

* make the test functions to create tokens better

* bring back `dashboard-url`

---------

Co-authored-by: Oisin Coveney <oisin@metabase.com>

* fixup more tests

* fix a test in api.embed-test

* fix typo

* fix dox typo

* api.embed-test is passing

---------

Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-09-06 13:10:26 -07:00
github-automation-metabase
1bbf501a7c 🤖 backported "upgrade webpack to address security issue" (#47604)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-09-06 17:42:05 +00:00
github-automation-metabase
07884cc7e1 🤖 backported "Revert multiple inheritance with SnowflakeVariant" (#47695)
* Revert multiple inheritance with SnowflakeVariant (#47680)

* Revert multiple inheritance with SnowflakeVariant (#47680)

* CI

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-09-06 16:25:32 +00:00
github-automation-metabase
c1854585e4 Always allow localhost:* on CORS (#47663) (#47710)
* Always allow localhost:* on CORS

* Use `embedding-app-origin-sdk` method for the headers

* Fix BE code formatting

* Fix BE formatting

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-09-06 16:12:34 +00:00
github-automation-metabase
ab77831889 fix: sqlserver handle uniqueidentifier uuids (#47544) (#47638)
* fix: sqlserver handle uniqueidentifier uuids

Fixes #46148

Include sqlserver in `uuid-type` handling as its `uniqueidentifier` type
stores uuids.

* Don't be so precise with varchar size

* Add seam for drivers to cast to text type

* Fix arg order

Co-authored-by: Case Nelson <case@metabase.com>
2024-09-06 16:08:09 +00:00
github-automation-metabase
350ffd70de 🤖 backported "recents updates to better support metrics" (#47141)
* recents updates to better support metrics (#47032)

* recents updates to better support metrics

allows updating metric views through the API
improves parent_collection calculation

* add 2 tests for metrics

* 🤖 backported "Entity id translation service"

---------

Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
2024-09-06 08:42:16 -07:00
github-automation-metabase
bbd45aed49 perf: Optimize some query processor functions (#47658) (#47716)
* perf: [metabase.util.performance] Faster mapv for small collections

* perf: Optimize some query processor functions

Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-09-06 15:28:19 +00:00
github-automation-metabase
ecd6b49655 Support field remapping in pivot queries (#47592) (#47693)
* Support field remapping in pivot queries

* Generate breakouts without inversions

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-09-06 17:16:40 +03:00
Jeff Bruemmer
eca8b05098 update docs (#47725) 2024-09-06 10:16:27 -04:00
github-automation-metabase
46dd249daf Fix Transparent disabled state on mantine switch label (#47677) (#47718)
* make custom disabled state more specific than transparent style

* make it less nesty

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-09-06 13:45:07 +00:00
github-automation-metabase
698d1bc71d Hide attached DWH database details (#47419)
== Goal ==

Hide attached DWH database details from anyone incl. admins:
* Do not show them in the UI
* Do not permit to change them
* Do not serialize them

The aim is that customers cannot gain access to (parts of) credentials,
and they cannot break a feature they are paying for by changing
connection details.

Database details are already generally excluded from H2 dump snapshots
(see `metabase.cmd.copy/*copy-h2-database-details*`), thus nothing
changes there.

== Implementation ==

The Metabase backend already contains provisions in the implementation
of `metabase.models.interface/to-json` for `:model/Database` to hide the
`details` of the database in HTTP responses, if the user lacks write
permission on the database.  We utilize this by adding an
`is_attached_dwh` column to the `database` table and rejecting
`metabase.models.interface/can-write?` when this flag is enabled.  In
the "admin" UI, we show a replacement text instead of the edit form when
the flag is set.  (It might be correct to show this whenever `details`
is absent.  See below for possible follow-up work.)

However, several sections of the frontend code expected the `details`
field to always be present.  In order to make `details` optional, as the
backend seems to handle it, we fix the respective code to treat this
case in the way that appears appropriate in the context.

== How to test ==

=== New behaviour ===

Setting the `is_attached_dwh` field hides the database details:

1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases.
   - In addition to the fields you would normally set, also set
     `is_attached_dwh: true`.
   - This also works when adding this flag to a database that previously
     did not have this flag set.
2. Start your Metabase instance.
3. Verify the database shows up in the "admin" section
   (`/admin/databases`).
4. Verify that clicking the database to see its details only reveals
   "This database cannot be modified."
5. Verify that responses from the backend do not include a `details`
   field for this database.

=== Original behaviour ===

Behaviour without setting the `is_attached_dwh` field is unchanged:

1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases.
   - Only set the fields you would normally set.  Do not set
     `is_attached_dwh` (or set it to `false`).
2. Start your Metabase instance.
3. Verify the database shows up in the "admin" section
   (`/admin/databases`).
4. Verify that clicking the database to see its details only reveal the
   regular edit form, showing connection fields like `host`, `user`,
   etc. with the values you configured.

== How this will be rolled out ==

1. Upgrade existing Metabase Cloud instances with data warehouse to a
   Metabase version that supports `is_attached_dwh`.
2. Set `is_attached_dwh` in the database section of the config file for
   Metabase Cloud instances with a data warehouse.

== Possible follow-up work ==

In https://github.com/metabase/metabase/issues/25715, absent
`database.details` was identified as a bug.  Since then, `details` was
made `NOT NULL` in the application database, so this bug can no longer
occur.  However, today backend responses can be missing the `details`
field, if the current user lacks write permission to the database
setting (see above).  Fully re-evaluating #25715 in this context is
outside the scope of this PR.

Closes: https://github.com/metabase/harbormaster/issues/5051
Backports: https://github.com/metabase/metabase/pull/47247
Backports: https://github.com/metabase/metabase/pull/47517
Backports: https://github.com/metabase/metabase/pull/47469
Backports: https://github.com/metabase/metabase/pull/47419
Co-authored-by: Dennis Schridde <63082+devurandom@users.noreply.github.com>
2024-09-06 15:16:02 +02:00
github-automation-metabase
64849ebdea Revert "Hide upload config when data warehouse is attached" (#47611) (#47666)
The way this was implemented, it also hid the section for management
of uploaded CSV files.  Further, admins might want to intentionally
switch from uploading to the data warehouse provided by Metabase to
one of their own.

This reverts commit fbaf58ad03.

References: https://github.com/metabase/harbormaster/issues/5121
References: https://metaboat.slack.com/archives/C032LFJFANL/p1725296255637989
Co-authored-by: Dennis Schridde <63082+devurandom@users.noreply.github.com>
2024-09-06 12:33:38 +02:00
github-automation-metabase
3778f83dd5 Catch Errors in Download process and only write error message (#47482) (#47696)
* walk the error to remove any visualization settings

Thanks Dan for the patch, this approach is nice because it doesn't require changing all 3 streaming-response-writer
implementations (json csv and xlsx). It keeps behaviour basically the same, but just cleans up the output to not
include potentially sensitive column/dataset details.

* add a test that confirms json/csv errors are cleaned

* walk the error to remove any visualization settings

Thanks Dan for the patch, this approach is nice because it doesn't require changing all 3 streaming-response-writer
implementations (json csv and xlsx). It keeps behaviour basically the same, but just cleans up the output to not
include potentially sensitive column/dataset details.

* add a test that confirms json/csv errors are cleaned

* fix dataset error test

* cljfmt

* try to be a little more surgical with what we take out of the error

* formatting again, oops

* pass export format, only modify the obj for file exports

In the case of errors being saved to files, the obj is a map with a :status :failed key assoc'd by the qp somewhere
along the way. The format-exception cond branch is not used in this case, so we can't rely on modifying
`format-exception` to just dissoc ex-data.

Instead, I've kept the obj modification, but it excludes the query and the preprocessed keys, which are the only 2
keys where we see :viz-settings. This doesn't eliminate the problem of needing to exclude other keys in the future,
but it does improve the surface area - the query and viz settings are the most likely candidates for holding
potentially sensitive info.

I'd prefer to stick with this solution, as we can get a fix for the security concern in quicker, and perhaps a
non-security bug can be opened regarding the most correct way to indicate errors to users whose downloads have failed.

* keep format-exception the same

* cleaner passing of export-format to write-error!

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-09-05 21:22:32 +00:00
github-automation-metabase
9a64a87940 perf: Miscellaneous card rendering improvements (#47679) (#47691)
* perf: Optimize reading rows into vectors in JDBC driver

* perf: Use direct interop when computing with-time-zone-same-instant

Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-09-05 18:48:58 +00:00
github-automation-metabase
faf3eb2586 [insights] Simplify args to simple-linear-regresion (#47665) (#47678)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-09-05 15:24:15 +00:00
Mahatthana (Kelvin) Nomsawadi
53340de05e Fix visualization with warnings doesn't work when embedding (#47622)
* Fix visualization with warnings doesn't work when embedding

* Clarify the test name
2024-09-05 15:51:18 +01:00
Aleksandr Lesnenko
fd60dd9734 add swc to gitignore (#47648) 2024-09-05 10:03:13 -04:00
github-automation-metabase
ba5b9d3bd1 Dashboard subscriptions and alerts should exclude archived cards (#47667)
(#47650)

Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-09-05 14:00:34 +00:00
github-automation-metabase
e7c0e9253d newsletter-toggle-clicked event (#47410) (#47669)
* newsletter-toggle-clicked event

* use ValidateEvent,

* rename event -> simple_event and trackEvent -> trackSimpleEvent

* use the renamed trackSimpleEvent function

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-09-05 13:56:59 +00:00
github-automation-metabase
e070e93ef2 docs - embedding params edits (#47635) (#47671)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-09-05 13:55:17 +00:00
github-automation-metabase
1546f0093b [serdes] improve dir detection (#47653) (#47664)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-09-05 12:57:10 +00:00
github-automation-metabase
4b3a7c7b1d perf: Add more timeseries insights optimizations (#47651) (#47662)
* perf: [insights] Optimize last-2 allocations

* perf: [insights] Optimize best-fit allocations when creating validation sample

* perf: [insights] Optimize simple-linear-regression

Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-09-05 12:16:31 +00:00
github-automation-metabase
ea440a4a25 fix hidden pivot table scroll bar in QB (#47629) (#47647)
* fix hidden pivot table scroll bar in QB

* Update Loki Snapshots

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-09-05 02:41:13 +00:00
github-automation-metabase
b2de5adc00 docs: clarify cumulative aggregations (#47545) (#47645)
* cumulative aggregations

* Apply suggestions from code review



* cumulative articles

* consolidate cumsum and cumcount articlesa

* links

* remove previews

* sort clarification

* Apply suggestions from code review



* link

---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-09-04 23:59:15 +00:00
github-automation-metabase
014582c4a3 🤖 backported "Entity id translation service" (#47308)
* fixup backport of: Entity id translation service

* entity id translation + tests

* add api level test

* simplify definition of eid-table->model + add test

* update tests to take keywords

* improve comment

* generate the eid-table->model map

* delete now-obsolete test

* make it work in oss

* put the resulting response into a key, so we can add more information later

* formatting

* use model names without the model/ prefix as keys

* Creates list of `api/model->db-model`

- update keys for util/entity_id request
- update shape of util/entity_id response
- add test for not-found eids

* formatting

* Respond to code review feedback

---------

Co-authored-by: Oisin Coveney <oisin@metabase.com>

* remove unrelated test

---------

Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-09-04 21:09:36 +00:00
github-automation-metabase
53eb960692 🤖 backported "fix time series with data gaps stacked bar charts crash when enabling segments labels" (#47619)
* fix time series with gaps stacked bar charts crash when enabling all labels (#47599)

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-09-04 19:16:17 +00:00
github-automation-metabase
649ec6de8e rename event -> simple_event and trackEvent -> trackSimpleEvent (#47608) (#47625)
* rename event -> simple_event and trackEvent -> trackSimpleEvent

* add empty line at the end of the file



---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Thomas Schmidt <thomas@metabase.com>
2024-09-04 18:05:19 +00:00
github-automation-metabase
d40b0287c9 Update default locked parameter value (#47607) (#47614)
* Add E2E tests

* Default locked parameter value to `[]`

* Fix unit tests

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-09-04 14:07:07 +00:00
Anton Kulyk
241995c528 Manual backport — Followup on "Fix crash when navigating between bookmarked dashboards" (#47612)
* Add repro test for #47170

* Use type guard when checking for cancelled request

* Export `isObject` type guard

* Avoid type casting

* Update e2e test
2024-09-04 14:15:14 +01:00
github-automation-metabase
bd8485aa71 Add v0.50.24 to the list of releases (#47591) (#47598)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-09-03 23:29:20 +00:00
github-automation-metabase
dced4dae71 pro callout (#47593) (#47594)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-09-03 21:53:52 +00:00
github-automation-metabase
bb8c913ba8 [MBQL lib] Allow temporal bucketing of Date(Time) expressions (#47427) (#47568)
Fixes #47341.

The QP now supports temporal bucketing of custom expressions, but that has
not been surfaced in the UI until now.

Describe the steps to verify that the changes are working as expected.

1. Use a database other than H2, since it doesn't support time zones.
1. New question -> Anything with a DateTime column
1. Create a custom expression like `convertTimezone([Date Column], "America/New_York", "UTC")`
1. Break out by that expression

The temporal bucketing should work in the UI and in the query results, save properly, etc.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-09-03 21:49:25 +00:00
github-automation-metabase
82e168b100 upgrade micromatch to address security issue (#47571) (#47583)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-09-03 19:52:41 +00:00
github-automation-metabase
3b633178ee Use table name in inactive table error if user has access to it (#47484) (#47516)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-09-03 19:41:08 +00:00
github-automation-metabase
ec3d11bec7 🤖 backported "Don't update updated_at when setting last_used_at on a card" (#47580)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-09-03 15:10:19 -04:00
github-automation-metabase
71caec4c83 Implement a simple greedy approximation for dedupe-joins (#47529) (#47548)
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-09-03 19:03:42 +00:00
github-automation-metabase
83e74142f2 Update partner-and-community-drivers.md (#47577) (#47578)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-09-03 17:32:12 +00:00
github-automation-metabase
7831283cf7 Add v0.49.25 to the list of releases (#47572) (#47573)
* Add v0.49.25 to the list of releases

* Update releases.md

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-09-03 16:55:56 +00:00
github-automation-metabase
a3ffd4b1d9 🤖 backported "Simplify finding metrics in Summarize" (#47503)
* Simplify finding metrics in Summarize (#46887)

* Use global search for aggregation picker

* Add names to aggregation picker items so they can be searched

* Render info icon metric descriptions

* Add unit tests for global aggregation picker search

* Add test for searching metrics

* Add a test for metrics descriptions

* Sort metrics

* Fix e2e test

* Use Flex from metabase/ui

* Handle markdown in metric description

* Add test for sorted metrics

* Update Markdown styling in metric description

* Fix clojure formatting

* Test for markdown in the Metric description

* Fix lint

* Fix test for markdown

* Use simpler equality test

* Fix overflow in test

* Add e2e test for legacy metrics searching

* Maintain results as a vec

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-09-03 18:29:14 +02:00
github-automation-metabase
a4176bfac7 Check joins in lib.metadata/editable? (#47421) (#47456)
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-09-03 19:00:46 +03:00
github-automation-metabase
95f1c3b566 [serdes] reveal exception causes (#47551) (#47556)
I still don't want users' eyes to bleed looking at (unnecessary?) stacktraces, but we need to be able to see exception
causes to determine what is going wrong

references #47520

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-09-03 12:15:18 +00:00
github-automation-metabase
8bfd15a891 Use app DB for query execution metrics (#46586) (#47549)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-09-03 08:48:59 +00:00
github-automation-metabase
0fdd8bcfee backport "Disallow duplicate order-by clauses in ::lib.schema.order-by/order-bys" #47532
Resolved minor conflicts in the following files due to unbackported PRs

src/metabase/lib/schema/util.cljc
- perf: Optimize validation with Malli #46485

src/metabase/query_processor/util.clj
- Use the new private defn #46013

-------------------------------------------------------------------------------

Disallow duplicate order-by clauses in ::lib.schema.order-by/order-bys (#47489)

* Move query-processor.util/remove-lib-uuids to lib.schema.util

This function will soon be needed in lib.schema.util in order to implement distinct order-by clause schema checking.

This function feels like it should live in lib.util instead of lib.schema.util, but that would create the following
circular import dependency since lib.util indirectly requires stuff from lib.schema.util:

  lib.schema.util -> lib.util -> lib.schema.util

* Don't create queries with duplicate order-bys in remove_replace_test.cljc

Otherwise, theses tests would fail soon when we add update the order-by schema to reject duplicates.

* Declare lib.order-by/order-bys to return ::lib.schema.order-by/order-bys

Previously it inlined the schema instead.

* Disallow duplicate order-by clauses in ::lib.schema.order-by/order-bys

Fixes: 39384

Co-authored-by: Mike Appleby <86076+appleby@users.noreply.github.com>
2024-09-02 22:17:37 +00:00
github-automation-metabase
1df01a0a8d Use consistent approach for disabling permission checks in QP to fix sandboxing error in downloads (#47481) (#47530)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-09-02 19:04:17 +00:00
Alexander Solovyov
afb382d970 backport "[serdes] a bit more valuable ns docstring" (#47511) 2024-09-02 15:21:34 +00:00
github-automation-metabase
a9364fd672 🤖 backported "Use original display name for fields in uploaded tables" (#47507)
* Use original display name for fields in uploaded tables (#47303)

* Rename

---------

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
Co-authored-by: Chris Truter <chris@metabase.com>
2024-09-02 12:16:56 +00:00
github-automation-metabase
126806d768 🤖 backported "Use function arguments rather than a dynamic var" (#47504)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-09-02 13:19:29 +02:00
github-automation-metabase
d6cf1dc71d 🤖 backported "Delete old serialization extension points and fallbacks" (#47310)
Co-authored-by: Chris Truter <chris@metabase.com>
2024-09-02 09:55:42 +03:00
github-automation-metabase
70b0ba2fc2 Bugfix part2 snowflake variants in attachments 46981 (#47488) (#47490)
* Snowflake Variant cols should also work in attachments

A previous PR fixed the snowflake variant bug by using a try/catch aroung the global-type-settings function.
I realized there was a second codepath using the same function and it gets used in xlsx attachment code, so I've made
the change there as well to prevent the same error in attachments.

* add a test to confirm the viz-settings-for-col function doesn't throw

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-08-31 14:40:46 +00:00
github-automation-metabase
ab3d557721 perf: Optimize insights and fingerprinting of time series (#47414) (#47491)
* perf: Use optimized stats functions for computing insights

* perf: Rewrite fingerprinters/with-error-handling to not generate closures

* fix: Don't reuse global-fingerprinter object

Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-08-31 10:48:17 +00:00
github-automation-metabase
7a63453443 🤖 backported "Update instance_analytics for 50 major release" (#47415)
Co-authored-by: Luiz Arakaki <luiz.arakaki@metabase.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2024-08-30 22:02:58 +00:00
github-automation-metabase
64f87c07ca Disallow connection impersonation roles which are not single strings (#47474) (#47479)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-08-30 20:09:10 +00:00
github-automation-metabase
06cdb900d5 🤖 backported "Add Malay Language Support" (#47402)
# Conflicts:
#	release/src/auto-translate.ts

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-08-30 12:43:57 -06:00
adam-james
9781c3c908 Enable native pivot xlsx and Incrementally add rows to Native Pivot xlsx exports (#47378)
* Incrementally add rows to Native Pivot xlsx exports

Adds a boolean env var `MB_NATIVE_PIVOT_EXPORTS` which enables the 'native pivot' feature in Downloads of xlsx files.

* Simplify the init

* remove unnecessary step

* properly use streaming workbook for pivot export too

This change initializes a non-streaming workbook so that a Pivot table can be added. Then, it turns that workbook into
a streaming workbook, so that we never have to keep the entire output in memory; just like non-pivot xlsx exports, we
can ensure more efficient output.

* Env var name more indicative of its temporary nature

I mean, all things eventually succumb to the inexorable march of time that sands away all lustre, it's just that this
environment variable will disappear much sooner, and intentionally.

* change env var name, add default row count in case no counts exist

* try to improve the area-ref code

* just kidding, figured out how to do A:D style refs

Still need to avoid the zip bomb problem, but at least now we don't need to know or guess the row count beforehand.

And, the fileszie ends up being smaller, though the time to download goes up a little bit.

* fix xlsx test

* should keep col name format behaviour the same
2024-08-30 18:16:25 +00:00
github-automation-metabase
34a0b11c70 fix: bigquery handle local date params as date (#47423) (#47468)
Fixes #30602

We were overriding localdate in bigquery driver to produce
offsetdatetimes for no apparent reason. This causes a number of problems
when dealing with date type columns.

Co-authored-by: Case Nelson <case@metabase.com>
2024-08-30 17:40:37 +00:00
github-automation-metabase
5761fb1c07 Snowflake Variant Type should not prevent downloads or attachments (#47434) (#47470)
* Snowflake Variant Type should not prevent downloads or attachments

Fixes #46981

The :type/SnowflakeVariant key matches 2 methods in `metabase.query-processor.streaming.common/global-type-settings`.

In this case, it seems that the variant type can be any type, so we shouldn't try to guess anything here, except if
the user has provided a :semantic_type, which we can use.

Otherwise, we'll keep going without formatting details about the variant column, which is likely fine already, as it
should result in strings in the export/attachments.

* add a test

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-08-30 17:08:30 +00:00
github-automation-metabase
2d2d13e823 🤖 backported "fix trend lines scaling" (#47462)
* fix trend lines scaling (#47361)

* fix trend lines scaling

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-08-30 16:13:21 +00:00
github-automation-metabase
93e79f3fe7 🤖 backported "locale query string support on public links and static embeds" (#47393)
* locale query string support on public links and static embeds (#47186)

* keep locale in url query params

* e2e tests

* ugly fix for the missing baseUrl error

* applies suggestion from Kelvin to make code more demure

* Update e2e/test/scenarios/sharing/public-question.cy.spec.js

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>

* remove it.skip added by mistake

* sort imports

* handle native question/ SyncedParametersList too

* shorter and more accurate comment 😅

* Update e2e/support/helpers/e2e-embedding-helpers.js

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

---------

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>

* fix tests, the button i was looking for is not on v50

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-08-30 17:54:03 +02:00
github-automation-metabase
4146eb6e22 Trigger BE tests when test_resources are updated (#47455) (#47459)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-08-30 14:41:57 +00:00
github-automation-metabase
9656f335b3 🤖 backported "Fix CSV uploads for non-ASCII headers" (#47372)
Co-authored-by: Chris Truter <chris@metabase.com>
2024-08-30 14:22:03 +00:00
github-automation-metabase
50a68ad7e7 🤖 backported "Add test against serialization YAML format changing" (#47443)
* Add test against serialization YAML format changing (#47349)

* fixup

---------

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
Co-authored-by: Chris Truter <chris@metabase.com>
2024-08-30 09:51:44 +00:00
github-automation-metabase
e5811a5505 perf: Perform string->datetime conversion once during timeseries insights (#47424) (#47439)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-08-30 08:01:26 +00:00
github-automation-metabase
c82ebb8111 Add new generic analytics event and bring types to trackSchemaEvent (#47408)
Co-authored-by: Thomas Schmidt <somtom91@gmail.com>
2024-08-30 04:37:53 +00:00
github-automation-metabase
62e9eca682 fix formatting null values adds prefix and suffix (#47435) (#47437)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-08-30 03:54:52 +00:00
github-automation-metabase
fccda35823 Minor schema fixes before pushing to Snowcat Cloud (#47409)
Co-authored-by: Thomas Schmidt <somtom91@gmail.com>
2024-08-30 03:28:19 +00:00
Aleksandr Lesnenko
ec901a50eb fix formatting applied to percent change (#47431) 2024-08-29 23:21:57 -04:00
github-automation-metabase
f7c10c3311 Add v0.50.23 to the list of releases (#47422) (#47429)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-08-29 21:17:45 +00:00
github-automation-metabase
465ab6b4a8 Migrate Tooltip in FormField to mantine to fix z-index issue (#47314) (#47417)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-08-29 17:32:16 +00:00
github-automation-metabase
7040ff1f47 Fixup backported migrations (#47398) (#47412)
These migrations will be backported to v49.

Three changes:

- update IDs/locations of the migrations to v49 vs v51

- add one preCondition (when adding the foreign key constraint)

- add `onFail: MARK_RAN` to the index preconditions. I forgot this
before, so it blows up when the precondition doesn't hold.

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-08-29 17:06:33 +00:00
github-automation-metabase
a2c0107cd2 🤖 backported "Exclude inactive tables from the perms cache, and block queries over inactive tables in the QP" (#47404)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-08-29 17:05:26 +00:00
github-automation-metabase
3ed7ce3866 Increase log level to INFO from error (#47397) (#47406)
* Increase log level to INFO from error

Closes #47396

logs before:
```
2024-08-29 08:37:03,836 INFO db.liquibase :: Checking if Database has unrun migrations...
2024-08-29 08:37:04,045 INFO db.liquibase :: Database has unrun migrations. Checking if migration lock is taken...
2024-08-29 08:37:04,047 INFO db.liquibase :: No migration lock found.
2024-08-29 08:37:04,047 INFO db.liquibase :: Migration lock acquired.
2024-08-29 08:37:04,167 INFO db.liquibase :: Running 83 migrations ...
```

logs after:

```
2024-08-29 08:39:45,019 INFO db.liquibase :: Running 83 migrations ...
...
2024-08-29 08:39:45,166 INFO liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-06-27T00:00:00::calherries ran successfully in 0ms
2024-08-29 08:39:45,182 INFO liquibase.changelog :: Columns is_defective_duplicate(boolean) added to metabase_field
2024-08-29 08:39:45,182 INFO liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-06-27T00:00:01::calherries ran successfully in 14ms
2024-08-29 08:39:45,199 INFO liquibase.changelog :: Custom SQL executed
2024-08-29 08:39:45,200 INFO liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-06-27T00:00:02::calherries ran successfully in 16ms
2024-08-29 08:39:45,202 INFO liquibase.changelog :: Foreign key fk_field_parent_ref_field_id dropped
2024-08-29 08:39:45,202 INFO liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-06-27T00:00:03::calherries ran successfully in 1ms
2024-08-29 08:39:45,204 INFO liquibase.changelog :: Foreign key constraint added to metabase_field (parent_id)
2024-08-29 08:39:45,205 INFO liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-06-27T00:00:04::calherries ran successfully in 2ms
...
```

* empty commit to bump CI

Co-authored-by: dpsutton <dan@dpsutton.com>
2024-08-29 12:00:51 -05:00
github-automation-metabase
9f056b540c Fix failed to backfill cache config due to number overflow (#47390) (#47405)
* handle cache config overflowed

* fix root too

* do not comment out test

* make cljfmt happy

---------

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-29 16:16:09 +00:00
metamben
036ad2ba9d Make metrics inherit their aggregation's name (#47262)
* Make metrics inherit the name of the aggregation

Fixes #40355.

The query processor expects the columns resulting from metric aggregations to be named based on the aggregation in the
metric definition, not by the name of the metric. This change brings metabase lib in sync with the query processor.

* Make metrics inherit the name of the aggregation

Fixes #40355.

The query processor expects the columns resulting from metric aggregations to be named based on the aggregation in the
metric definition, not by the name of the metric. This change brings metabase lib in sync with the query processor.

* Fix test

* Resolve metric once only
2024-08-29 17:26:03 +03:00
github-automation-metabase
961a67397a Adding schema name to recents, search results in CP (#47366)
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2024-08-29 08:55:02 -03:00
github-automation-metabase
6a56a6ecd0 update aws-java-sdk-core: brings in new jackson with fixed vulnerability (#47384) (#47388)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-29 11:17:54 +00:00
github-automation-metabase
7e99d2c7d0 update slack-web-api in release helper (#47385) (#47389)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-29 10:24:58 +00:00
github-automation-metabase
f7c4423b54 Fix flaky test update-db-to-never-scan-values-on-demand-test (#47295) (#47302)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-29 10:12:48 +00:00
github-automation-metabase
3ffb9effdd Use Serialization spec for Collection (#47240) (#47287)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-08-29 12:12:05 +03:00
github-automation-metabase
854b3c5668 docs - notes on public links (#47315) (#47317)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-28 19:52:13 +00:00
github-automation-metabase
24178ce0f0 🤖 backported "Populate permission cache only for one DB at a time" (#47364)
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2024-08-28 19:23:32 +00:00
github-automation-metabase
cf55fb3d7d 🤖 backported "Much better collection permission performance" (#47251)
* Much better collection permission performance (#46942)

PREFACE: THIS IS A BACKPORT COMMIT. And it was a painful one, because some
previous very relevant changes hadn't been backported. So there are some
changes from the original, non-backported, commit:

- removed all support for getting the trash collection, getting things
that were `archived_directly`, or getting collections by
`archive_operation_id`. None of these exist in this branch.

- in this branch, functions like
`permissions-set->visible-collection-ids` did not check for archived
status or anything other than permissions. On `master`, they do. So, the
new function that replaced them,
`collection/visible-collection-filter-clause`, also checks for archived
status as well as permissions. To resolve this, I chose to just default
`collection/visible-collection-filter-clause` to ignore archived status
and return both archived and unarchived collections.

On to the original commit message:

There are a few separate changes here:

- Migrations: add and populate indexed columns perm_value, perm_type, and collection_id to permissions

These fields allows us to efficiently run queries based on collection permissions in the DB without string manipulation. Keeping the table as permissions allows us to do this migration in-place. Note that in some cases collections may have been deleted from the database without deleting the associated permissions row (since there was no foreign key before). We need to be defensive here: if we have a permissions row without a corresponding collection, delete the row before running the rest of the migration.

- Write perm_value, perm_type, and collection_id for new collection permissions

A very simple before-insert method sets these fields before a collection permission is written to the DB.

- Replace collection/permissions-set->visible-collection-ids and collection/visible-collection-ids->honeysql-filter-clause with collection/honeysql-filter-clause

Previously, just about everywhere we used permissions-set->visible-collection-ids, what we were essentially doing was an in-app join: select all the collection IDs you have permission on, then convert it to a SQL clause like WHERE collection_id IN ( all of those collection IDs).

Replace both of these with honeysql-filter-clause, which uses the new fields we added to permissions above to construct a honeysql filter representing "all the collections I have permissions on", without needing to round-trip them to the application and back to the DB.

Of course, we can then write a function visible-collection-ids, which uses honeysql-filter-clause, for those cases where we do actually need the whole bunch in the application (we use this, for example, when constructing the effective-location for a collection).

I also added one more toggle to the VisibilityConfig that's passed into the honeysql-filter-clause (and used to be passed to permissions-set->visible-collection-ids), allowing you to select only the effective children of some collection.

* Backport: Speed up calculation of effective_ancestors

https://github.com/metabase/metabase/pull/47324

Previously, `visible-collection-ids` was effectively "free" in that we'd
cached `collection-id->collection` for *all* collections, within a
single request, and then locally filtered it for permissions without
needing to hit the database again.

To be honest, there is probably a better fix for this - we're repeatedly
calling `visible-collection-ids` when we probably could just save a
single copy of it and use it when calculating the effective location of
every collection.

However, this is a very quick and low-risk fix, and I want to prioritize
getting this done, and then we can improve it later.

Locally, I copied down the database from stats and timed the
`/api/search?model_ancestors=true` endpoint.

Before my "speedup" PR (https://github.com/metabase/metabase/pull/46942)
it took ~7 seconds to return results.

After my "speedup" PR, it took ~15s to return results. :grimace:

With this change, it takes 818ms to return results. 🎉

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-08-28 12:09:41 -07:00
github-automation-metabase
0f2a39599f Support ctrl + click on command palette links again (#47328) (#47365)
* remove prevent default on CP links

* unit flakes?

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-08-28 18:53:02 +00:00
github-automation-metabase
94ef690ba8 Fix crash when navigating between bookmarked dashboards (#47311) (#47358)
Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-08-28 16:33:50 +00:00
github-automation-metabase
53c52a0c31 [QP] Return datetimes in SQL Server, even with date-sized truncation (#47248) (#47350)
Previously, truncating a `:type/DateTime` column by `:month` or `:day`
would return a `:type/Date`, which subtly broke the query.

In particular, if you try to order-by the breakout column `Created At (month)`
then it would not get de-duplicated, causing a SQL error about conflicting
ORDER BY clauses.

Fixes #46992.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-08-28 14:11:42 +00:00
Alexander Solovyov
4ce779afe9 [backport] add a test to check that openapi definitions can be generated (#44586) (#47335) 2024-08-28 06:10:39 -04:00
github-automation-metabase
6d4a688f86 fix stacked row tooltip shows null values (#47333) (#47334)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-08-28 02:33:49 +00:00
github-automation-metabase
58eda67f6d backport: resolve conflicts in js_test.cljs (#47325)
Resolved conflicts in legacy-ref-test related to a metrics test that depends on changes that weren't backported.

Relevant unbackported changes in 460ac41f6f

Conflicts:
	test/metabase/lib/js_test.cljs

Ensure that CI checks fail if cljs tests fail (#47192)

* Fix typo in expression-clause-normalization-test

s/time-interval/relative-time-interval/

* Add missing table-id to card def to fix failing legacy-ref-test

* Ensure that if yarn test-cljs fails it fails the CI checks

When configured to autorun, the command

   shadow-cljs compile test

will exit success even if test failures occur in the node test. See

   https://github.com/thheller/shadow-cljs/issues/425

In order to ensure our CI checks fail when cljs tests fail, we need to invoke
node directly. To prevent running the tests twice, remove `:autorun true` from
the `:test` target in shadow-cljs.edn.

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2024-08-27 17:39:30 -06:00
github-automation-metabase
77944416b5 backport: resolve conflicts in zoom_in_timeseries.cljc (#47316)
Resolve conflicts in zoom_in_timeseries.cljc by replacing unbackported mu/defn- with "mu/defn ^:private".

Conflicts:
	src/metabase/lib/drill_thru/zoom_in_timeseries.cljc

-----------------------

zoom-in-timeseries-drill: do not include :hour and :minute for DATE columns (#46997)

* zoom-in-timeseries-drill: do not include :hour and :minute for DATE columns

When the user attempts to drill through a DATE column, we should not return :hour or :minute drill throughs from
available-drill-thrus. Previously we did, which resulted in an error being displayed when the user attempted to select
them.

Modify next-breakout-unit in zoom_in_timeseries.cljc to not return :hour or :minute units for :type/Date columns,
which prevents these from being returned by available-drill-thrus, which prevents them appearing in UI context menus.

* Use lib.temporal-bucket/available-temporal-buckets

Per review feedback, use lib.temporal-bucket/available-temporal-buckets to get the valid-current-units in
metabase.lib.drill-thru.zoom-in-timeseries.

* Do not construct zipmap just to lookup the next unit

Rather than constructing a zipmap from `valid-current-units', which requires iterating over the seq twice, just
traverse the seq once and return the next item in the seq (if any).

Constructing a zipmap made sense in the old code because it was constructed once from static data and used many times
for lookup. In the new version, the vec of `valid-current-units` is dynamic and dependent on the type of the breakout.

* PR suggestion: use threading macro rather than nested sexps

Co-authored-by: Braden Shepherdson <braden@metabase.com>

* PR suggestion: use threading macro rather than transducer / eduction

* PR suggestion: reduce boilerplate in zoom-in-timeseries tests

Reduce code dup by looping over aggregation and bucketing options rather than having a separate deftest for each.

---------

Co-authored-by: Braden Shepherdson <braden@metabase.com>
Fixes #39366

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2024-08-27 23:28:10 +00:00
github-automation-metabase
68236637e7 docs - clarify caching doc (#47330) (#47331)
* clarify caching doc

* edit

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-27 21:18:27 +00:00
github-automation-metabase
a86d84a5a1 Remove failing assertion in CLJS diagnose-expression-test (#47271) (#47274)
Failing after changes in 13983247ee

Per slack conversation, ok to disable:

https://metaboat.slack.com/archives/C013N8XL286/p1724711461313089?thread_ts=1724414568.662469&cid=C013N8XL286

Co-authored-by: appleby <86076+appleby@users.noreply.github.com>
2024-08-27 16:24:33 +00:00
github-automation-metabase
08386857c5 🤖 backported "fix import order in the files with disabled rules" (#47259)
Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-08-27 13:43:44 +00:00
github-automation-metabase
dd75df9450 Add v0.49.24 to the list of releases (#47300) (#47307) 2024-08-27 13:34:00 +00:00
github-automation-metabase
17222663f6 Add v0.50.22 to the list of releases (#47275) (#47305)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-08-27 13:19:45 +00:00
github-automation-metabase
b6a9f496f2 More logging around serialization error (#47278) (#47285)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-08-27 12:40:34 +00:00
github-automation-metabase
60dc55ad84 🤖 backported "Use more precise query contexts when recording execution of public downloads" (#47239)
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2024-08-27 12:09:11 +00:00
github-automation-metabase
280d57522c Refactor e2e helpers and commands to TypeScript function helpers (#47237) (#47283)
* Convert e2e-custom-column-helpers to TS

* Refactor createTimeline, createTimelineEvent & createTimelineWithEvents to TS

* Fix circular imports

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-08-27 09:35:01 +00:00
github-automation-metabase
16a6c22d5a Don't encrypt boolean settings (by default) (#47179) (#47269)
* Don't encrypt boolean settings (by default)

We have tooling to disable encryption on settings even when the
`MB_ENCRYPTION_SECRET_KEY` is set. Turn it on by default for all boolean
settings, which don't need to be encrypted.

I also optimized the code that decrypts settings on startup because I
didn't want to delay startup if someone had set a bunch of boolean
settings. With 20 set, the old version added about 200+ ms to startup,
about 10ms per boolean setting, whether or not it was encrypted or in
the DB already. The optimized version selects all the never-encrypt
values from the database at once (a bit silly, but we also just exclude
raw `true` and `false` values so we don't bother checking them) and
updates them if they're encrypted - this adds ~40ms to startup with 20
encrypted boolean settings (about 2ms per boolean setting) and ~5ms to
startup on subsequent runs, when no encrypted values are in the DB.

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-08-26 23:39:12 +00:00
github-automation-metabase
056d292fae [MBQL lib] Disable expression type checking entirely (#47245) (#47265)
This testing is too strict to support some legitimate use cases that
have no workaround at present. We can bring back this type-checking
eventually, once it's possible to correctly express things like
automatic coercion of strings to numbers in `SUM` aggregations.

Fixes #44431.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-08-26 22:37:19 +00:00
github-automation-metabase
14b631ef96 docs - locale for static and public links (#47194) (#47258)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-26 20:36:59 +00:00
github-automation-metabase
d982e64cf1 docs: serialization clarification (#45480) (#47257)
* serialization clarification

* Update docs/installation-and-operation/serialization.md



* Update docs/installation-and-operation/serialization.md



* Update docs/installation-and-operation/serialization.md



* Update docs/installation-and-operation/serialization.md



---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-26 20:25:39 +00:00
github-automation-metabase
2b103a6400 fix(dashboard): In dashboard value source modal, after closing question picker modal, don't also close the first modal (#47242) (#47252)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-08-26 20:25:10 +00:00
github-automation-metabase
484283e464 Update appearance.md (#36538) (#47253)
* Update appearance.md

Adding information about how colors are selected by Metabase because there is the confusion that the order in which you select colors is the order you get on the chart

* Update appearance.md

Removed code reference and tried to simplify the context

* Update docs/configuring-metabase/appearance.md



---------

Co-authored-by: Tony-metabase <110378427+Tony-metabase@users.noreply.github.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-26 19:53:11 +00:00
github-automation-metabase
5fc7df9850 Fix DateTimeRange substitution for open ranges (#47175) (#47233)
* Fix DateTimeRange substitution for open ranges

* Add E2E repro for #47172

* cljfmt

* Add test for datetime column

* Update range boundary for open range

* Update test names

* Apply suggestions from code review



* Fix e2e

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
Co-authored-by: Nemanja <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-08-26 17:34:18 +00:00
github-automation-metabase
2f708823a3 Fix error message in Create API Key modal (#47161) (#47244)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-08-26 16:55:52 +00:00
metabase-bot[bot]
f0c5dc4b40 [openapi] do not die when :query-params is not a map (#44549) (#47225)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-26 13:11:19 +00:00
github-automation-metabase
cbb1d749e2 Add database type adjustments to server side generated temporal values (#47039) (#47224)
* Add database type adjustments to server side generated temporal values

* Speculative base type change

* Infer timezone only from _actual_ user, not global user level

* Set timezone for actual user in test extensions

* Add test case

* Update type info generation

* Adjust server side relative datetime

* Update src/metabase/driver/sql/query_processor.clj



* Fix base type logic

* Fix typo

* Fix formatting

* Update user name handling

* cljfmt

* Address review comments

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-08-26 12:09:36 +00:00
github-automation-metabase
2b4a5c2a7b 🤖 backported "dx: forbid imports from storybook testing-library outside stories" (#47078)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-08-26 11:09:13 +03:00
github-automation-metabase
c1c82ecf49 🤖 backported "[serdes] move most of the models over to using spec" (#47049)
* [serdes] move most of the models over to using spec (#46966)

* [serdes] keep nulls in export when there are nulls in the db

this retains previous behavior

* [serialization] extract subtree should hydrate entities (#47171)

* [serdes] a few improvements, instance_analytics cleanup script

* source_card_id is in master, not 50

* [serdes] move Action to using spec (#46973)

* action fixes

---------

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-26 08:52:29 +03:00
github-automation-metabase
05bbb3dd42 Strip expression metadata for field expression (#47155) (#47204)
* Strip expression metadata for field expression

Fixes #44940.

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-08-25 21:21:17 +00:00
github-automation-metabase
0e7e36716d Fix mu/fn and mu/defn support for map schemas on key-value args (#47153) (#47205)
* Fix #46846

* Don't use `-v` to check if script has arg since it doesn't work on all bash versions

* Fix typo

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2024-08-24 00:20:10 +00:00
github-automation-metabase
79b3cf7d7e [Permissions] Data permissions graph utils reorganization (#47023) (#47199)
* reorganizes data-permissions.ts to be a folder split by a file per concern, moves some logic out into other utils files where it makes sense

* pr feedback and fix lints

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-08-23 19:44:24 +00:00
github-automation-metabase
42baef1350 🤖 backported "45003 entity picker recents context" (#46645)
* 45003 entity picker recents context (#46289)

* useLogRecentItem

* updating tests

* unit tests

* e2e test

* PR Feedback

* log questions / models

* Accept :dataset instead of :model

* Adding e2e test for recent activity datasets, reverting 'await' changes

* Add e2e for collection moving error

---------

Co-authored-by: dan sutton <dan@dpsutton.com>

* updating tests

* stupid local db 🙄

---------

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
Co-authored-by: dan sutton <dan@dpsutton.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2024-08-23 15:54:17 -03:00
github-automation-metabase
6e45c3aef1 🤖 backported "extending table component features" (#47144)
* extending table component features

* untangle pagination controls

* adding pagination control roll

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2024-08-23 11:49:18 -03:00
github-automation-metabase
063ed99ca2 🤖 backported "Update UTM tags in static embed modal links" (#47176)
* Update UTM tags in static embed modal links (#47116)

* Update interactive embedding CTA UTM tags

* Make the UTM tags more readable

* Update static embed doc UTM tags

* Update static embed appearance customization doc UTM tags

* Update font upsell UTM tags

* Update tests

* Fix wrong upgrade URL

* Update tests

* Change the UTM back to master's version as discussed

* Make Metabase banner upgrade URl the same with master

---------

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-08-23 15:13:46 +01:00
github-automation-metabase
2f1e1c368a 🤖 backported "Properly detect when Snowflake is using a local key file when expanding connection properties " (#47142) 2024-08-23 09:48:59 -04:00
github-automation-metabase
e940aae4c9 perf: [insights] Use direct conversions in ->millis-from-epoch to avoid clojure.java-time overhead (#47145) (#47164)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-08-23 08:39:05 +00:00
github-automation-metabase
5c4a951030 perf: [date-2.parse] Add a fastpath for timestamps that are likely ISO instants (#47143) (#47163)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-08-23 10:10:10 +03:00
github-automation-metabase
f5358170c8 Fix n+1 when getting field values for dashboard (#47113) (#47125)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-23 03:59:09 +00:00
github-automation-metabase
3ddd9ad28d 🤖 backported "Make recents understand context" (#44647)
* broken state - fixes fe/e2e merge conflicts, commit be conflicts

* fix migration conflict

* fix merge conflicts in recent_views model ns

* Recent views events conflict fix

* commiting backend and frontend fixes

* migration ordering fixes

- also removed: Migrate v1 metrics to v2 metrics as that is not in 50

* fix test namespace broken merges

* remove notion of metric from recent views

* fix tests in api/activity_test

* e2e and CI adjustments

* linting woes

* migration archeology

---------

Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2024-08-22 16:50:20 -06:00
github-automation-metabase
87d6daf00b fix pivot table overflow (#47102) (#47137)
* fix pivot tables overflow & edit styles

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-08-22 12:34:07 -04:00
Cam Saul
a5ca6b92ff Backport cljfmt config and run against 50 (#47108)
* Pull latest config from https://github.com/metabase/metabase/pull/47047

* Initial sort pass

* Fix Kondo warnings

* Fix Kondo warnings
2024-08-22 15:58:11 +00:00
github-automation-metabase
59a6f78a94 Don't allow viewing a timeline without coll perms (#46863) (#47129)
If we don't have access to the collection, we shouldn't have access to
the timelines.

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-08-22 14:33:22 +00:00
github-automation-metabase
71dda600d2 [serdes] extract result_metadata.fk_target_field_id (#47122) (#47127)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-22 14:17:56 +00:00
github-automation-metabase
4efc26c788 Add support for pipe separator in CSVs (#47114) (#47117)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-08-22 12:41:12 +00:00
github-automation-metabase
2ab537026d handle warnings from reselect about broken selectors rules (#47076) (#47120)
* handle reselect warnings about wrong usage of selectors

* return stable references

* add a comment

* address excellent review

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-08-22 11:56:28 +00:00
Nicolò Pretto
7f5ed0352d Reduce the number of choices in onboarding flow [backport] (#47067)
* make the newsletter signup a checkbox instead of a button (#46783)

* make the newsletter signup a checkbox instead of a button

* update copy on unit test

* fix describe nesting

* update the ui to be like the design

* make tests use userEvent.click to avoid warning about missing act

* use the subscribeToNewsletter function

* add basic e2e test for newsletter subscription

* move wait to the end of the test to see if it passes in ci

* remove async to see if it fixes the issue

* trying to mock the response

* make it clear why we're mocking the response

* use getUserEmail as suggested by Sloan

* inline var a suggested on code review

* fix padding on setup completed step when on cloud (#47021)

* skip analytics opt out step for people on cloud (#46965)

* poc of removing data usage step for the tech plan

* pretend it's not cloud if hasAddedPaidPlanInPreviousStep is true

* split the jest tests files to simulate pro cloud, pro selfhosted and starter cloud scenarios

* bump onboarding version to 1.3.0 (#47055)

* fix linting issue
2024-08-22 13:26:37 +02:00
github-automation-metabase
75f66d9d30 Fix SchemaItem type (#47068) (#47112)
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-08-22 07:54:48 +00:00
Nemanja Glumac
af7bc5aa45 Use the initial originalQuestion in the saveModal (#47086)
* Use the initial originalQuestion in the saveModal

* Add E2E repro for 42773
2024-08-22 08:42:41 +02:00
github-automation-metabase
07158e4db2 Ensure blocked tables downgrade into blocked dbs (#47093) (#47110)
* tests ensure blocked tables downgrade > blocked db

* implement the blocked table -> blocked db rollback

- move/add tests for it

Co-authored-by: bryan <bryan.maass@gmail.com>
2024-08-21 23:18:28 -04:00
github-automation-metabase
1635c63f95 Make sure we insert special segmented permission paths for sandboxed tables on downgrade to 49 (#47085) (#47105)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-08-22 02:19:06 +00:00
Vamsi Peri
daed329cd1 fix auto request review fail (#47109)
* fix auto request review fail

* Update auto-request-review.yml
2024-08-22 01:06:50 +00:00
github-automation-metabase
fb604e38eb Add missing day in :minute timestamp formatter (#47104) (#47107)
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-08-21 23:40:37 +00:00
Jeff Bruemmer
61241e6af7 docs - update api docs (#46794) 2024-08-21 16:25:42 -04:00
github-automation-metabase
f55d2bebb6 Remove unnecessary calls to /api/collection(#46752)
* Remove unnecessary calls to `/api/collection` (#46752)

* use ee api to find custom reports collection

* remove deprecated hook

* fix race condition

* add unit tests

* fix circular dependency

* fix unit tests

* another plugin strategy
# Conflicts:
#	frontend/src/metabase/collections/components/CollectionContent/CollectionContent.tsx
#	frontend/src/metabase/common/hooks/entity-framework/use-collection-list-query/use-collection-list-query.unit.spec.tsx
#	frontend/src/metabase/components/SaveQuestionForm/context.tsx
#	frontend/src/metabase/components/SaveQuestionForm/util.ts
#	frontend/src/metabase/containers/SaveQuestionModal/SaveQuestionModal.unit.spec.tsx
#	frontend/src/metabase/nav/containers/MainNavbar/MainNavbarContainer/MainNavbarContainer.tsx
#	frontend/src/metabase/query_builder/components/QueryModals/QueryModals.tsx

* fix a thing

* fix more import conflicts

---------

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-08-21 14:05:17 -06:00
github-automation-metabase
a8f5a1fb49 Fix docker-compose not available on Mac (#47054) (#47092)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-08-21 19:05:11 +00:00
github-automation-metabase
f23e91dd36 docs: Update MongoDB Atlas connection instructions (#47088) (#47091)
* mongodb connection

* mongodb connection info

* Apply suggestions from code review



---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-21 17:42:04 +00:00
github-automation-metabase
fcca551f13 Bump presto driver to v288 (#47071) (#47075)
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
2024-08-21 16:24:19 +00:00
Jeff Bruemmer
01fb1040b7 add download row limit (#47074) 2024-08-21 15:24:26 +00:00
github-automation-metabase
bf6c76bff7 docs - blocked at table level (#46937) (#47080)
* blocked at table level

* edits

* note on sql questions

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-21 15:14:55 +00:00
github-automation-metabase
e3eae49792 Add v0.50.21 to the list of releases (#47073) (#47077)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-08-21 14:56:23 +00:00
Uladzimir Havenchyk
ec9f5d72f1 fix import order (#47069) 2024-08-21 13:06:56 +00:00
github-automation-metabase
f7d4a3d498 docs: concat clarification (#46851) (#46895)
* concat

* we fixed this!

* format

* links

* Apply suggestions from code review



---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-08-21 12:15:11 +00:00
github-automation-metabase
dd29fb3d24 🤖 backported "fix(browse): Use a simpler approach for representing paths responsively" (#46858) 2024-08-21 07:37:26 -04:00
github-automation-metabase
5ac95a7e4a clean up Azure AD references (#47041) (#47045)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-08-20 23:07:33 +00:00
github-automation-metabase
ab5904157e fix: Handle tokens in strings when parsing params (#46547) (#46616)
* fix: Handle tokens in strings when parsing params

Fixes #38051
Fixes #36262
Fixes #11755

* Fix handling snippets with single quotes in name

Co-authored-by: Case Nelson <case@metabase.com>
2024-08-20 23:01:35 +00:00
github-automation-metabase
a0f7e080da refactor: Simplify question data source (#46989) (#47027)
* Split utils from `QuestionDataSource`

* Do the computation inside the component

* Compute query only once

* Fix imports order

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-08-20 21:29:53 +00:00
github-automation-metabase
62ef01e63f fix: upgrade elliptic to resolve security issues (#47014) (#47028)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-08-20 20:25:50 +00:00
github-automation-metabase
25ba3ae126 Fix 46221: Wrong collection shown in ad-hoc model-based questions (#47008) (#47010)
* Remove `Collections` entity loader

* Load collections directly within the component

* Add E2E repro for #46221

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-08-20 20:17:44 +00:00
github-automation-metabase
85203c02d3 docs: bring back code highlighting (#47029) (#47033)
* highlight 1

* highlight 2

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-08-20 20:04:53 +00:00
Raphael Krut-Landau
a6c1a2dd65 fix: Use 'loading-indicator', not 'loading-spinner', as the testid for loading indicators (#46842) 2024-08-20 15:58:13 -04:00
github-automation-metabase
89d12f8795 Update later stage stale references on clause removal (#46926) (#47020)
* Add update-stale-references and test

* Update test

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-08-20 19:06:46 +00:00
github-automation-metabase
142fa9e019 🤖 backported "perf: Optimize CSV exporting" (#46904)
* perf: Use more efficient iteration and formatting in CSV export

* perf: Replace clojure.data.csv functions with more efficient implementations

* fix: Fix formatting for integer numbers in scientific notation

Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-08-20 14:17:09 -04:00
github-automation-metabase
3ad5df10c8 🤖 backported "refactor: sort import members inside destructuring" (#47016)
Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
2024-08-20 18:11:35 +00:00
Nemanja Glumac
d7eac998e9 🍒 backported "refactor: rework QueryModals to a functional component" (#47015) 2024-08-20 17:27:10 +02:00
github-automation-metabase
5931ca49bd 🤖 backported "Remove extra bottom margin from summarized ad-hoc question" (#46999)
Co-authored-by: Nemanja <31325167+nemanjaglumac@users.noreply.github.com>
2024-08-20 16:21:21 +02:00
github-automation-metabase
fe4d6da92f docs - locked filter note (#46940) (#47012)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-20 12:57:17 +00:00
github-automation-metabase
dac50d07ef resolves conflicts (#46988)
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2024-08-19 16:38:58 -06:00
github-automation-metabase
99c5a59de6 docs: special field filter syntax (#46982) (#46985)
* field filter syntax

* Update docs/questions/native-editor/sql-parameters.md



---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-19 19:38:51 +00:00
github-automation-metabase
46a37133c9 Update Translations for v50.21 (#46609) (#46974)
* Add new strings for v50.20

* update translations for 50.21

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-08-19 17:19:25 +00:00
github-automation-metabase
97948c6641 Allow missing Content-type header on GeoJSON (#46920) (#46975)
If the content-type header is missing entirely, let it through. We're
not trying to be overly restrictive here, just prohibit things that are
clearly not GeoJSON.

Fixes https://github.com/metabase/metabase/issues/46918

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-08-19 16:46:14 +00:00
github-automation-metabase
84d7563028 Simple util to measure allocations for single-threaded code (#46951) (#46960)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-08-19 11:33:54 +00:00
github-automation-metabase
becf61adc9 🤖 backported "Refactor e2e JavaScript API commands to TypeScript function helpers" (#46952)
* Refactor e2e JavaScript API commands to TypeScript function helpers (#46934)

* Remove unused file

* Refactor getCurrentUser command to a TS function util

* Refactor createAlert command to a TS function util

* Refactor createModerationReview command to a TS function util

* Reuse createModerationReview

* Refactor createPulse command to a TS function util

* Remove references to deleted files

* Improve typing

* ESLint

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-08-19 10:31:28 +00:00
github-automation-metabase
3bd2ba0306 Fix unable to send pulse with multi-series (#46908) (#46909)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-19 08:39:12 +00:00
github-automation-metabase
1506e87fed [serdes] extract-nested instead of relying on hydration (#46912) (#46936)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-18 08:33:06 +00:00
Anton Kulyk
d4de46f6ff Manual backport — Fix public dashboards are cut when printing (#46921)
* Fix public dashboards are cut when printing

* Add comment
2024-08-16 16:24:16 +01:00
github-automation-metabase
5aa2aa9bd9 docs - notes on memory usage (#46156) (#46930)
* notes on memory usage

* typo

* Update observability-with-prometheus.md

* Update running.md

* update link

---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
2024-08-16 14:14:37 +00:00
github-automation-metabase
e3be43f06d Put a band-aid around flake with spec generator (#46762) (#46910)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-08-16 09:01:51 +00:00
github-automation-metabase
7cd09ecf22 Speed up updating user parameter value (#46615) (#46875)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-16 08:43:33 +00:00
github-automation-metabase
b612a91aa1 reduce logs during setup tests (#46834) (#46877)
* refactor: memoize getSteps selector

* screen.getXXX.click() => userEvent.click(...) to avoid missing act() warning

* use mockSettings so that MetabaseSettings.setAll is called and we avoid the unknown features warning

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-08-16 07:44:28 +00:00
github-automation-metabase
64d1a8adbb 🤖 backported "Add Timeseries insights even when Custom Columns exist" (#46742)
* Add Timeseries insights even when Custom Columns exist (#46253)

* Add Timeseries insights even when Custom Columns exist

WIP

Fixes 46244

I don't know why it was (maybe still is) required that the :other columns be empty before providing insights.

* might be a solution to changing trendlines when data doesn't change

The insights code that powers the frontend trendline requires taking a sample of the dataset.

This sampling has some randomness associated by design, and should maintain its randomness. But it makes some sense to
use the exact same sample when the input has not changed at all, hence trying this memoize approach out.

Might not be the final solution, but it's a start

* add test to show that insights are computed

* use java.util.random with a seed to keep insights stable

* fix failing e2e test

I don't understand why other runs on the release branch have been passing this? But in any case, I've copied this
change from master to fix it.

---------

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
2024-08-15 13:56:59 -07:00
github-automation-metabase
dcd17d8858 skip some troubleshooting stats when hosted (#46749) (#46899)
* skip some troubleshooting stats when hosted

* fix typo

* just skip "system-info" and "app db details"

Co-authored-by: bryan <bryan.maass@gmail.com>
2024-08-15 20:08:55 +00:00
John Swanson
b28675d6d8 Allow disabling encryption for settings (#43085) (#46773)
* Allow disabling encryption for settings

For two settings, we want to disable encryption entirely.

On the way out of the data source, we don't need to worry - the
decryption is already backwards-compatible with non-encrypted data.

On the way in, things are a bit less straightforward. The core of the
change is replacing the `t2/deftransform` that *always* runs
`encryption/maybe-encrypt` on the value with:

- a define-after-select that always tries to decrypt the value (so we
can handle existing encrypted values in the db)

- a define-before-insert that encrypts the value if the `defsetting`
told us to, and

- a define-before-update that does the same thing.

For now, set two settings to be never-encrypted: `analytics-uuid` and
`anon-tracking-enabled`.
2024-08-15 05:15:33 -07:00
github-automation-metabase
cc4de4bc2f 46657 pulse edit migration (#46693) (#46859)
* Functional and typed

* migrate Recipient Picker

* removing dead code

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-08-15 08:48:01 -03:00
github-automation-metabase
ef3c0328ba 🤖 backported "Clean up serdes v2 exceptions" (#46878)
* Clean up serdes v2 exceptions (#46577)

* Add missing field to exception

* fix indentation

* Inline helper that doesn't exist yet

---------

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
Co-authored-by: Chris Truter <chris@metabase.com>
2024-08-15 11:40:14 +00:00
github-automation-metabase
3fb0cf2266 make local cypress dx great again (#46839) (#46846)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-08-14 18:36:28 +00:00
github-automation-metabase
6cb874052b 🤖 backported "Show loading state while fetching data in a new model page" (#46746)
* Show loading state while fetching data in a new model page (#46694)

* Show new model loading state while fetching

* Show new model loading state while fetching

* Add unit test

* Use `DelayedLoadingSpinner` instead

* Update the test

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

* Prettier

---------

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

* Fix the test

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-08-14 16:13:18 +00:00
github-automation-metabase
7e38a48fca Enable type info computation for string id fields (#46488) (#46819)
* Enable type info computation for fields coming from model source query

* Add test

* Add handling for fields coming from joins

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-08-14 16:02:43 +00:00
github-automation-metabase
a745bb7ee5 Don't disable triggers before data perms migration (#46826) (#46831)
I didn't consider that we might not have permissions necessary to
disable triggers.

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-08-14 13:48:27 +00:00
metabase-bot[bot]
acca6b9b2b perf: Optimize XLSX export by using more efficient iteration (#45669) (#46814)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-08-14 08:07:20 +00:00
metabase-bot[bot]
2483a2519f perf: Work around Apache POI ColumnHelper performance bug (#45667) (#46813)
Co-authored-by: Oleksandr Yakushev <alex@bytopia.org>
2024-08-14 08:06:26 +00:00
github-automation-metabase
3a8af0d742 Fix exported png got different backgrounds based on screen density (#46769) (#46815)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-08-14 07:48:36 +00:00
github-automation-metabase
d5b25cd9c2 🤖 backported "[serdes] convert database, card and dashboard with friends to using spec" (#46720)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-14 09:58:12 +03:00
github-automation-metabase
b1fe5fc6ec 🤖 backported "Add default value to report_card.last_used_at" (#45384) 2024-08-14 05:57:28 +00:00
github-automation-metabase
c97ff90afd limit the anon stats on query execution to 30 days (#46560) (#46811)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-14 04:45:56 +00:00
github-automation-metabase
c87df66ad8 Add v0.50.20 to the list of releases (#46804) (#46808)
* Add v0.50.20 to the list of releases

* Update releases.md

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-08-14 00:56:23 +00:00
github-automation-metabase
9996c99dbe Repro #46756: Add/remove a single column in a model with tables joined by themselves adds/removes all columns (#46757) (#46764)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-08-14 00:24:49 +00:00
github-automation-metabase
6c72f779fc Add v0.49.23 to the list of releases (#46800) (#46803)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-08-13 21:47:19 +00:00
github-automation-metabase
df82d584bf fix(admin/performance): Ensure that the tab's title (e.g. Database caching) and 'Performance' are visible in document title (#46602) (#46685)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-08-13 18:31:23 +00:00
github-automation-metabase
001ed0c523 Export Formatting Correctness (#46306) (#46692)
* Export Formatting Correctness

WIP

Several bugs exist around the correctness of export formatting, this aims to fix them.

Fixes #27374

When a model has viz settings/metadata changed after save, the download won't incorporate said changes. At least it's
clear that scale doesn't work.

* number formatter merges settings from columns too

* column formatting on aggregated cols works in xlsx now too

* fixes 43040 by grabbing global-type-settings in csv formatter

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-08-13 17:56:42 +00:00
github-automation-metabase
4081e04ec0 🤖 backported "fix(webapp/sidenav): Move Browse sidebar section in between Trash and other collections" (#46604)
* fix(webapp/sidenav): Move Browse sidebar section in between Trash and other collections (#46457)

* wip

* restore mainnavbarview

* fix(webapp/sidenav): Move Browse sidebar section below collections (#46457)

---------

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-08-13 17:31:10 +00:00
github-automation-metabase
733dde5ebe Speed up permissions migrations (round 2) (#46393) (#46778)
* new version of data_access migration + run ANALYZE beforehand

* relax constraints on migration timestamps

* more migration rewrites

* fix bug in migration

* fix another bug and remove extraneous logging

* reorder migrations to fix ID validation

* start adapting the changes to mysql as well

* wip

* add more ANALYZE calls

* revert logging changes

* finish duplicating work for mysql + a bit of clean up

* create H2 versions of migrations without the ANALYZE calls

* remove ANALYZE call from view_data.sql (probably not necessary)

* fix mysql syntax

* fix another mysql bug

* another mysql fix

* Don't exclude inactive tables for data_access

* Don't write rows for Administrators group

* Don't write rows for Admins (H2/MySQL)

* disable triggers before perms migration

---------

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-08-13 15:58:40 +00:00
Denis Berezin
1906650fbe Manual backport 46160 (#46722)
* Manual backport 46160

* e2e tests fix
2024-08-13 18:28:50 +03:00
github-automation-metabase
e83c367e21 fix: uuid join conditions should not cast (#46614) (#46662)
Fixes: #46558

In #45575 we introduced casting uuid fields for drilldowns.

However we failed to include a check that the rhs was itself another
field of uuid type and so no casting should occur. This broke joins on
models when the database_type of the field may not be known.

Co-authored-by: Case Nelson <case@metabase.com>
2024-08-13 17:04:55 +02:00
John Swanson
c975b67593 Backport: Nicer error messages for linting migrations (#43667) (#46734)
* Nicer error messages for linting migrations

In general, just throw exceptions instead of using clojure spec here.

You'll only get one error per run, but that seems fine.

I did keep some specs around, but run them slightly differently. Rather
than validating the whole collection of changeSets at once with `s/+`,
just `doseq` through the changeSets and validate each one separately.

That way, the value that's presented as erroneous is much smaller (a
single changeSet) and it's easier to see what went wrong.

* Update bin/lint-migrations-file/test/lint_migrations_file_test.clj



* Update bin/lint-migrations-file/src/lint_migrations_file.clj



* Require preConditions for certain liquibase change types to encourage idempotence (#44578)



* remove `!`s from non-side-effecty fns

* add preConditions to a few v51 migrations

---------

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-13 06:51:45 -07:00
github-automation-metabase
73ff1e68bc Refactor parameters filters utils to TS (#46719) (#46725)
* Refactor filter utils to TS

* Remove type casts

* Improve dimension instantiation

* Fix typing

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-08-13 07:53:44 +00:00
github-automation-metabase
f1ea3c65f2 Fix the distance between "Field to map to" and "required" (#46747) (#46759)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-08-13 05:59:14 +00:00
github-automation-metabase
7ff46f6f71 Remove unnecessary api call from create collection form (#46736) (#46755)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-08-12 23:39:46 +00:00
Aleksandr Lesnenko
e05a1ea941 fix clearing parameter value closes tab (#46754) 2024-08-12 23:23:31 +00:00
Nemanja Glumac
c0defe216e Fix relative date options popover placement (#46702)
* Fix relative date options popover

* Add repro for #46342

* Revert "Fix relative date options popover"

This reverts commit ceaf62d90b.

* Use the Mantine Popover z-index
2024-08-12 22:24:36 +00:00
github-automation-metabase
d7344128fd Fix exports E2E flakes (#46690) (#46698)
* conditional dismissal step

* check for download status in the container

* try fixing flakes again

* try again

* chartPathWithFillColor already verifies chart has been rendered

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-08-12 21:25:20 +00:00
github-automation-metabase
1427b56385 [serdes] ability to skip errors (#46591) (#46709)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-12 20:51:24 +03:00
github-automation-metabase
2108dd1e68 Dowload Row Limit Env Var (#46401) (#46731)
* Dowload Row Limit Env Var

Adds `MB_DOWNLOAD_ROW_LIMIT` to enable changing the row limit on downloads and alert/subscription attachments (not the
rendered tables, but the .csv, etc.).

Based on: #44982 (Thanks, @r-kot)

Partially implements: #28144

The difference in this PR compared to #44982 is that the download limit applies to all downloads, the only exception
being when the limit is above `qp.i/absolute-max-results` (1048575, based on Excel's limitation); in such a case, the
user supplied limit is only used if the download is csv or json, and `qp.i/absolute-max-results` is used for xlsx.

This PR also fixes alert/subscription attachment limits; prior to this, they were set to the in-app limit of 2000
rows, but now they will follow the user supplied download-row-limit.

This PR also adds a test to the downloads-and-exports test namespace, confirming that they follow the supplied limit,
or the max limit if none is supplied.

* add test confirming the default limit works

* fix test to use the download-row-limit

* address review feedback

* Update src/metabase/public_settings.clj



* add test covering case where download-row-limit is unset

---------

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-08-12 10:00:19 -07:00
github-automation-metabase
fd33365e16 44723 human readable coercion strategies (#46347) (#46717)
* Revert "Remove unused humanizeCoercionStrategy and its test suite (#36136)"

This reverts commit 5375347e33.

* humanize coercion strategies, add e2e test

* unit test adjustment

* pr feedback

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-08-12 15:53:15 +00:00
Alexander Solovyov
d5472c04ae [openapi] fix query parameter detection and add default/description handling (#44239) (#46711)
Also OpenAPI generation now handles parameter renaming, like in `{c :count}` destructuring.
2024-08-12 17:09:10 +02:00
github-automation-metabase
92ea1a2230 🤖 backported "Fix oom during sync field values" (#46623)
* Fix oom during sync field values (#46524)

Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-12 14:03:22 +00:00
github-automation-metabase
c71a6983a9 Last Used Param Value doesn't fill in with default value if cleared (#46468) (#46665)
* Last Used Param Value doesn't fill in with default value if cleared

Fixes #46368

The Last used parameter value is cleared when the frontend sends `nil` as the parameter's value. This works except in
cases where a user clears a parameter with a default value. In this case, we want to indicate that the parameter is
cleared, so we store `nil` in the appdb in such a case.

* Update src/metabase/query_processor/dashboard.clj



* add assertion showing that 'nil' with default is still stored

---------

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-08-09 02:05:09 +00:00
github-automation-metabase
174c5ef6b1 🤖 backported "fix(webapp/browse): Fix bug where verified filter is applied to recents even when no verified models exist" (#46559)
This is a backport of three PRs: #46462, #46487, and #46571. The last of these corrects a broken e2e test introduced when the other two were combined
2024-08-08 17:34:30 -04:00
github-automation-metabase
d4b566ba4c 🤖 backported "Convert AlertListPopoverContent to TS" (#46626)
* Convert `AlertListPopoverContent` to TS (#46413)

* Fix backport test, hopefully

---------

Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-08-08 16:39:46 +00:00
github-automation-metabase
bf4ce91005 🤖 backported "Split AlertModals into multiple files" (#46629)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-08-08 17:37:48 +03:00
github-automation-metabase
c19ca866c4 🤖 backported "Add useCreateQuestion and useSaveQuestion for SDK's Create Question" (#46622)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-08-08 17:36:16 +03:00
github-automation-metabase
8451124f6d ci: replace docker-compose and fix mba usage (#46517) (#46640)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-08-08 14:24:43 +00:00
github-automation-metabase
270c4708dc make series style settings tab first (#46549) (#46617)
* make series style settings tab first

* spec

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-08-08 06:48:29 +00:00
github-automation-metabase
9cb0f0265e 🤖 backported "e2e: add cypress-terminal-report" (#46584)
* e2e: add cypress-terminal-report

* enable video recording

* revert error

* add a comment

* Update e2e/support/cypress.js



---------

Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-08-08 06:46:00 +00:00
github-automation-metabase
753c50d7ba bump loki tolerance (#46600) (#46608)
* bump loki tolerance

* fix loki-update command

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-08-07 20:47:42 -04:00
github-automation-metabase
a80daed7cd docs: fix titles (#46599) (#46601)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-08-07 20:48:44 +00:00
github-automation-metabase
7078f6ddde Protect against invalid file uploads (#46566) (#46585) 2024-08-07 22:09:22 +02:00
github-automation-metabase
b8792b8b6c Hide upload config when data warehouse is attached (#45842) (#46597)
== Goal ==

Prevent admins of Metabase Cloud instances with Metabase Cloud Storage
from accidentally breaking their upload configuration, since in this
scenario that is automatically managed by Metabase Cloud to use the
attached data warehouse.

== How to test ==

On a subscription with Metabase Cloud Storage:
* The "Uploads" section in the left sidebar of `/admin/settings` does
  not show
* A "not found" page is shown at `/admin/settings/uploads` where one
  would otherwise expect the "Uploads Settings" page
* `PUT /api/setting` with an `uploads-settings` field in the body fails
  with `403 Forbidden` and the setting is not changed
* `PUT /api/setting/uploads-settings` fails with `403 Forbidden` and
  the setting is not changed
* `GET /api/setting` contains an element with `key: "uploads-settings"`
  and a value
* `GET /api/setting/uploads-settings` responds with the value
* `GET /api/session/properties` contains the `uploads-settings` field

Closes: https://github.com/metabase/harbormaster/issues/5121

Co-authored-by: Dennis Schridde <63082+devurandom@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-08-07 21:32:20 +02:00
github-automation-metabase
356075d52c snowflake connection info (#46588) (#46596)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-07 17:59:02 +00:00
github-automation-metabase
49156dfadd Add v0.50.19 to the list of releases (#46515) (#46595)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-08-07 17:36:27 +00:00
github-automation-metabase
0668f3d1b7 Handle non-number cases in NumberFingerprint (#46579) (#46590)
* Add unit test for #46574

* Handle non-numeric values in NumberFingerprint

* Be more realistic about NumberFingerprintDisplayInfo type

* Add comment on why the types are unknown

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-08-07 16:29:02 +00:00
github-automation-metabase
c48ed32e61 Fix bad i18n string (#46454) (#46537)
Fixes #46440

couple things come together here.

Bad escaping:
The `{` characters are used for format strings and placeholders like

```clojure
impl=> (translate "fr" "After {0}" ["Bob"])
"Après Bob"
```

And if you want _literal_ {'s in your translation string, you must
escape them like "'{" or "'}" using an apostrophe. But this isn't the
end of our worries.

in `resources/zh-CN.edn`, we actually have _two_ translations for the
original string:

```clojure
"User lookup filter. The placeholder '{login'} will be replaced by the user supplied login."
"用户找过滤器,占位符 '{login'} 将替换为用户提供的登录名。"

,,,

"User lookup filter. The placeholder '{login}' will be replaced by the user supplied login."
"用户查找筛选器。占位符“{login}”将替换为用户提供的登录名。"
```

And this later has unescaped curlies.

The fix for that is at
https://poeditor.com/projects/po_edit?per_page=20&id=200535&id_language=31&filter=&order=&search=User+lookup+filter
but will need to wait for the new source translation string in this
instance with the corrected escaping.

```clojure
;; simulate what happens at runtime
impl=> (translated-format-string "zh_CN"
                                 "User lookup filter. The placeholder '{login}' will be replaced by the user supplied login."
                                 {})
"用户查找筛选器。占位符“{login}”将替换为用户提供的登录名。"
impl=> (MessageFormat. *1 (locale "zh_CN"))
Execution error (NumberFormatException) at java.lang.NumberFormatException/forInputString (NumberFormatException.java:67).
For input string: "login"
;; the problematic zh-CN string
impl=> (MessageFormat. "用户查找筛选器。占位符“{login}”将替换为用户提供的登录名。")
Execution error (NumberFormatException) at java.lang.NumberFormatException/forInputString (NumberFormatException.java:67).
For input string: "login"
;; minimal reproduction
impl=> (MessageFormat. "“{login}”")
Execution error (NumberFormatException) at java.lang.NumberFormatException/forInputString (NumberFormatException.java:67).
For input string: "login"
```

Co-authored-by: dpsutton <dan@dpsutton.com>
2024-08-07 16:22:20 +00:00
github-automation-metabase
50c5fda2cd Resolve conflict in filter.ts (#46563)
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-08-07 18:15:16 +02:00
github-automation-metabase
abca54c0c7 Delete database using config file (#46437) (#46583)
== Goal ==

Currently the config file (`MB_CONFIG_FILE_PATH`) only allows adding or
changing databases, but not removing them.  Since connected databases
can be managed as a service by us, it becomes necessary to delete any
information Metabase has about them, including any stored credentials.

Since this is a destructive operation with no way to revert (without
restoring from a backup), we raise the bar for accidental deletion and
require not just a (boolean) flag, but a magic string to be set.

== How to test ==

1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases.
2. Start your Metabase instance.
3. Verify the database shows up in the "admin" section and it works.
   Create a dashboard and questions using the database.
4. Add a `delete: "DELETE_WITH_DEPENDENTS:${name}"` line to your
   database configuration section.
5. Restart your Metabase instance.
6. Verify the database no longer shows up in the "admin" section.
   Notice that questions using it are gone, too.

References: https://github.com/metabase/harbormaster/issues/5173

Co-authored-by: Dennis Schridde <63082+devurandom@users.noreply.github.com>
2024-08-07 15:44:19 +00:00
github-automation-metabase
490c4490e8 Exclude javax.annotation/javax.annotation-api (#46546) (#46581)
dep is brought in by google cloud

From `clj -X:deps tree :aliases '[:ee :drivers]'`

```
  . metabase/bigquery-cloud-sdk metabase/modules/drivers/bigquery-cloud-sdk
    . com.google.cloud/google-cloud-bigquery 2.38.1
      . com.google.cloud/google-cloud-core 2.35.0
      [...]
      . javax.annotation/javax.annotation-api 1.3.2
```

Before this change:

```
❯ clj -X:deps tree :aliases '[:ee :drivers]' | grep 'javax.annotation/javax.annotation-api'
      . javax.annotation/javax.annotation-api 1.3.2
```

After:

```
❯ clj -X:deps tree :aliases '[:ee :drivers]' > deps-master

❯ echo $?
0
```

Co-authored-by: dpsutton <dan@dpsutton.com>
2024-08-07 15:40:41 +00:00
github-automation-metabase
fa34f8d04e 🤖 backported "Consider the first 10 lines when inferring upload separator" (#46576)
Co-authored-by: Chris Truter <chris@metabase.com>
2024-08-07 16:11:27 +01:00
github-automation-metabase
c07a2c34ed e2e: allow cypress to start with --browser=firefox passed (#46569) (#46578)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-08-07 14:30:18 +00:00
github-automation-metabase
5d857781c2 🤖 backported "Batch processing usage metadata" (#45629)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-07 13:35:16 +00:00
github-automation-metabase
394d2581b6 ci: do not save same m2 cache multiple times (#46545) (#46551)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-08-07 10:35:20 +02:00
github-automation-metabase
de6d6bb410 Allow edits to users with empty name fields (#46511) (#46557)
* allow edits to uers with empty name fields

* add repro for 40750

* whoopsie

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-08-06 23:34:55 +00:00
Jeff Bruemmer
20d438a2c7 update env vars (#46550) 2024-08-06 17:19:07 -04:00
github-automation-metabase
82c39fe59e docs - add MariaDB page (#45763) (#46544)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-06 18:50:52 +00:00
github-automation-metabase
8355a7bea4 Add v0.49.22 to the list of releases (#46355) (#46374)
* Add v0.49.22 to the list of releases

* Update releases.md

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-08-06 18:11:29 +00:00
github-automation-metabase
216fbcaa82 Gracefully handle ignored errors during sync (#45968) (#46534)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-08-06 16:13:18 +00:00
github-automation-metabase
3bcd4a4b57 ci: enable video recordings for failing cypress tests (#46281) (#46506)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-08-06 09:27:16 +00:00
lbrdnk
0b97bf894d expose MB_DB_QUERY_TIMEOUT_MINUTES setting (#44759) (#46476)
Co-authored-by: Radosław Kotkiewicz <37927890+r-kot@users.noreply.github.com>
2024-08-06 10:47:47 +02:00
github-automation-metabase
2fae7e7ae0 🤖 backported "Remove uncessary db calls when updating card" (#46507) 2024-08-06 15:20:12 +07:00
github-automation-metabase
8a8c0494da fix: mongo ObjectId should be orderable (#46501) (#46503)
* fix: mongo ObjectId should be orderable

Fixes #46259

Mongo ObjectId derive :type/TextLike but that can't be an orderable
type, so we mark the specific Mongo type as orderable for malli schemas.

* Fix test

Co-authored-by: Case Nelson <case@metabase.com>
2024-08-05 20:41:51 +00:00
github-automation-metabase
9aa85284a5 🤖 backported "fix: In delayed error/loading wrapper, on error, display the error" (#46463) 2024-08-05 13:40:10 -04:00
Sloan Sparger
6d617fbd33 [Permissions] Fix advanced permissions edits not always saving (#46498) 2024-08-05 15:35:07 +00:00
github-automation-metabase
b27df2a75e fix db switching in ts/with-dbs (#46481) (#46490)
mt/with-temp opens transaction which is used by toucan to make requests, so `mt/with-db` had no impact on database used inside of mt/with-temp

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-05 15:10:14 +00:00
Kamil Mielnik
1b358551aa Manual backport - #46322 - "Reset all filters" button (#46486)
* Cherry pick changes

* Remove unit of time parameters tests

* Downgrade tests to v50 behavior

* Remove unit of time test
2024-08-05 15:28:13 +01:00
github-automation-metabase
a0eeb46a94 🤖 backported "Update "Clear" and "Reset" buttons" (#46473)
* Update "Clear" and "Reset" buttons (#46050)

* Refactor dashboard helpers to TypeScript

* Reuse existing helper

* Refactor cy.createQuestionAndDashboard to a function helper
- there was no good place to put it, so I also created new helpers/api directory
- and I moved all helpers using cy.request (with 1 exception, where a CSV download helper also does a bunch of assertions) in there

* Merge TS command definitions into a single file

* Export types

* Make dashboardDetails optional

* Export StructuredQuestionDetails

* Remove duplicated function

* Extract createNativeQuestion to separate file
- 1 exported helper per file, no exceptions!

* Reuse const

* Add test for unit of time parameters

* Improve assertions

* Extract createDashboardWithParameters

* Add tests for time parameters

* Fix hardcoded parameter_mappings ids

* Format code

* Extract checkButtonVisible

* Improve test names

* Add tests for location parameters

* Reuse const

* Update test name

* Add WidgetStatusButton

* Add unit tests for WidgetStatusButton

* Rename handler

* Remove redundant assertions

* Add iconSize prop

* Fix styling

* Replace WidgetStatusIcon with WidgetStatusButton
- Remove WidgetStatusIcon

* Fix tooltip issue

* Fix tooltip for good

* Use default compact button size

* Prevent overflow

* Fix alignment issues in parameter sidebar
- Remove iconSize prop
- Simplify StatusConfig

* Update padding in Unit of Time input to make it consistent with other inputs in dashboard parameter sidebar

* Update unit tests

* Rename WidgetStatusButton to WidgetStatus

* Explicitly specify what is a button

* Update helpers in tests

* Update when buttons are displayed according to the new spec, update tests

* Simplify label

* Remove utils

* Adjust padding

* Update reset icon

* Make the button gray when color is undesired

* Remove old definitions

* Add missing export

* Remove unused type

* Add test for location (single value)

* Add test for id (single value)

* Add more assertions

* Add test for id (multiple values)

* Improve name

* Add tests for number (single and multi value)

* Add tests for text (single and multi value)

* Rename file

* Update comment

* Update test name

* Use unique ids

* Use new color name

* Add a test for chevron icons alignment

* Lift className up

* Make types more specific

* Sort attributes

* Revert "Make types more specific"

This reverts commit 2e6994b5ed.

* Revert "Use new color name"

This reverts commit 2cc68df6ba.

* Remove TODO

* Introduce editFilter util, refactor chevron assertions to work with any number of chevrons

* Connect label to the default value input in ParameterSettings

* Add a whitespace in the default value label when required "(required)" is shown

* Add parameter sidebar tests for unit of time

* Add parameter sidebar tests for date filters

* Extract checkParameterSidebarDefaultValue

* Add parameter sidebar tests for location - single values

* Add parameter sidebar tests for location - multiple values

* Use constants for test case names

* Add parameter sidebar tests for id parameters - single values

* Add parameter sidebar tests for id parameters - multi values

* Add parameter sidebar tests for number parameters - single values

* Add parameter sidebar tests for number parameters - multi values

* Add parameter sidebar tests for text parameters - single values

* Add parameter sidebar tests for text parameters - multi values

* Extract checkDashboardFilters

* Use checkDashboardFilters in time parameters

* Use checkParameterSidebarDefaultValue in checkDashboardFilters

* Use checkDashboardFilters everywhere

* Sort helpers

* Rename checkDashboardFilters to checkDashboardParameters

* Rename checkOnlyOneButtonVisible to checkStatusIcon

* Add test suite for sql filters, coverage for text filter - single value

* Add a whitespace in the default value label when required "(required)" is shown - SQL filters
- Similar to 930dd3a50a

* Add test suite for sql filters, coverage for number filters

* Add test for sql filters - date

* Remove unused things, rename placeholder to labelOrPlaceholder

* Apply label only to 1 input

* Add test for sql filters - field parameters

* Fix date tests

* Make all sql filters tests work

* Add assertions for required without default in text filters

* Add assertions for required without default in date filters

* Add assertions for required without default in field filters

* Allow clearing required SQL filters without default value

* Add a test to ensure comma-separated numeric values work

* Update unit test

* Update helper

* Update e2e tests

* Use != null and == null checks with defaultValue instead of just checking if its truthy/falsy

* Run `yarn test-visual:loki` and then `yarn loki approve`
- see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069

* Use parameterHasNoDisplayValue to account for empty strings

* Run `yarn test-visual:loki` and then `yarn loki approve` after merging master
- see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069

* Run `yarn test-visual:loki` and then `yarn loki approve`
- see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069

* Run `yarn test-visual:loki` and then `yarn loki approve`
- see https://metaboat.slack.com/archives/C505ZNNH4/p1721289287037069

* Remove unit of time parameters tests

* Downgrade tests to v50 behavior

* Downgrade tests to v50 behavior

* Remove unit of time test

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-08-05 19:29:05 +07:00
github-automation-metabase
43b09134f2 add note about locked parameters (#46392) (#46426)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-05 12:22:18 +00:00
github-automation-metabase
41db421cda [xray] separate limits for max cards in section and max total cards (#46436) (#46439)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-05 07:18:59 +00:00
github-automation-metabase
6c9593e759 fix missing horizontal scroll on pivot tables (#46400) (#46467)
* fix pivot table missing horizontal scroll

* spec

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-08-02 20:39:29 -04:00
github-automation-metabase
fa5c496949 Remove global css module that was applying red borders (#40112) (#46461)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-08-02 20:53:28 +00:00
github-automation-metabase
c00aa59e8e Perf fix for card metadata in QP (#46459)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-08-02 20:27:15 +00:00
github-automation-metabase
a62e8901c7 🤖 backported "Properly handle SMTP Settings environment variables" (#46451) 2024-08-02 13:10:39 -06:00
github-automation-metabase
0f8737f8c4 Avoid sorting by missing aggregation reference (#46386) (#46452)
* Update values-from-card-query

* Add test

* Update values-from-card-query

* Add missing issue no

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-08-02 18:43:52 +00:00
github-automation-metabase
1b286f3ec5 🤖 backported "fix viz settings not persisted during question edit" (#46402)
* fix viz settings not persisted during question edit (#46308)

* fix lost settings

* add e2e test

* trigger ci

* fix e2e test

* fix lint

---------

Co-authored-by: Emmad Usmani <emmadusmani@berkeley.edu>
2024-08-02 18:40:44 +00:00
github-automation-metabase
b4aa4d3c57 🤖 backported "fix db connection form icons" (#46390)
* fix db connection form icons (#46290)

* fix db connection form icons

* fix db connection form icons

* appease typescript

* update tooltip helper for v50

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-08-02 18:30:57 +00:00
github-automation-metabase
ebf44c3db1 Revert "Preprocess queries before data perms check (#45601)" (#46429) (#46431)
This reverts commit c7a5aee1f8.

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-08-02 17:15:57 +00:00
github-automation-metabase
c457b5dcb4 remove reference to Google Analytics (#46445) (#46448)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-02 16:26:17 +00:00
github-automation-metabase
b2e3583e8e test: do not allow cypress to raise an error on timeline hover (#46230) (#46442)
* do not update size if width or height is 0

* add a comment

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-08-02 16:19:59 +00:00
github-automation-metabase
d3cc556357 docs - various link fixes (#46441) (#46444)
* link fixes

* more links

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-08-02 16:00:01 +00:00
github-automation-metabase
6c65887b3d [Permissions] Update ordering of create query permissions options (#46391) (#46435)
* updates the ordering of create queries permissions options so that granular permissions is the last option

* fix unit test

* move granular option above no

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-08-02 14:58:47 +00:00
github-automation-metabase
8f6de78ae1 Add extra geojson content type (#46427) (#46430)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-08-02 14:27:08 +00:00
github-automation-metabase
d58d211902 Reduce memory usage when sending anon stat (#46404) (#46418)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-02 10:22:37 +00:00
github-automation-metabase
aac0bb9280 Fix sync indexes mark all fields with same name as indexed if one of them is (#46313) (#46314)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-02 08:51:57 +00:00
github-automation-metabase
5cb1b420a3 Avoid adding temporal-unit to lhs cols (#46262) (#46388)
* Avoid adding temporal-unit to lhs cols

* Use :default temporal-unit

* Simplify logic, update comments

* Update substitute-field-filter-test

* Update align-temporal-unit-with-param-type-test

* Update field-filter-date-test

* Use end-excludding gte lt filter for DateTime fields

* Update substitute-field-filter-test

* Update align-temporal-unit-with-param-type-test

* Update field-filter-date-test

* Update bigquery test + comment

* Update date-str->qp-aware-offset-dt

* Add guard for unexpected date string format

This is just for the completeness, I haven't encountered it.

* Address review remarks

* Update comment

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-08-02 10:46:31 +02:00
github-automation-metabase
fe0304bee4 [serdes] http api: be more picky about files we unpack from an archive (#46362) (#46407)
Previously we unpacked everything and picked up first entry as the directory
containing the data. This works well when archives are passed as is. However,
if a user unpacks and then packs an archive, there is a good chance that some
hidden directories will appear - and they are first in order.

So we skip those right now, and additionally check known markers of the
serialization data directory.

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-02 08:21:00 +00:00
github-automation-metabase
bf75bd59d1 Permissions modal dismiss patch (#46381) (#46385)
* dismiss permissions modal regardless of network request

* Spelling is hard

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-08-01 17:50:35 +00:00
github-automation-metabase
90698c65c0 make search results filterable by concrete ids (#46276) (#46323)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-08-01 10:50:33 +03:00
github-automation-metabase
6a5598e362 Fix x-ray generate invalid query for table with Date column (#46317) (#46361)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-08-01 07:24:16 +00:00
github-automation-metabase
68a5378034 Update Translations for v50.16 (#46015) (#46303)
* Add new strings for v50.15

* import updated translations

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-07-31 22:08:40 +00:00
github-automation-metabase
f486e979a0 Update links to Learn section of metabase.com (#46336) (#46340)
Co-authored-by: Gustavo Saiani <gus@metabase.com>
2024-07-31 18:07:19 +00:00
github-automation-metabase
37261f51aa fix(webapp/browse): Use user locale if available in Browse models (#45914) (#46333)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-07-31 13:42:20 -04:00
github-automation-metabase
6e64eb99bc Quick Followup to Pull #45691 (#46286) (#46338)
Since I set auto-merge to #45691, I missed some bits of review feedback.
Luckily, nothing was blocking, so these are small readability/docs changes

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-07-31 17:20:24 +00:00
github-automation-metabase
701d4389dd 🤖 backported "test: reduce flakiness by waiting longer for loader to disappear" (#46326)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-31 14:10:02 +00:00
github-automation-metabase
ddd38d7730 update firefox link (#46330) (#46331)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-31 13:01:21 +00:00
github-automation-metabase
5a0258b4a2 docs: import clarification (#46328) (#46329)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-07-31 12:53:50 +00:00
github-automation-metabase
ea81606b80 Add v0.50.18 to the list of releases (#46304) (#46325)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-07-31 12:08:02 +00:00
github-automation-metabase
f67912d5fe correct tar command (#46299) (#46324)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-31 11:59:05 +00:00
github-automation-metabase
fd383fe97e e2e: Rewrite dashboard card resizing spec (#46212) (#46236)
* Use function helpers

* Only assert the resize down

* Refactor repro 31701

* Remove flaky tag

* Better organize describe blocks

* Move custom `requestTimeout` config to the common block for resizing tests

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-31 13:47:55 +02:00
github-automation-metabase
94274c2b12 🤖 backported "fix(admin/nav): Ensure that the "Exit admin" button can be clicked regardless of locale or viewport size" (#46171)
Closes #45876

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-07-31 02:06:20 +00:00
github-automation-metabase
4cfd80d0a2 🤖 backported "Indicate in-progress exports" (#46257)
* Indicate in-progress exports (#45697)

* indicate in-progress exports

* specs, public dashboards

* add onbeforeunload hook when uploads are in-progress

* fix resolving conflicts

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2024-07-30 20:13:43 -04:00
github-automation-metabase
c323ffc909 + handle double-quotes in table and schema name in privileges query (#46268) (#46274)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-07-30 20:39:05 +00:00
github-automation-metabase
9a0425bf5a Show error when geojson coordinates are outside lat/lng bounds (#46064) (#46296)
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-07-30 20:12:21 +00:00
github-automation-metabase
5154be552f Pass parameter values as JSON (#46282)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-30 17:42:18 +00:00
github-automation-metabase
3bdf87941e do not run licenses step only when the value is true (#46272) (#46278)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-30 16:45:02 +00:00
github-automation-metabase
e04352e000 🤖 backported "fix(webapp/sidenav): Fix bookmark reordering" (#46270)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-07-30 14:54:33 +00:00
github-automation-metabase
9044690ebe 🤖 backported "Avoid all tables in memory during sync" (#46238)
Co-authored-by: Cal Herries <calherries@gmail.com>
2024-07-30 17:40:15 +03:00
github-automation-metabase
4b95dc13b3 ci: Fix E2E flake for the reproduction #21559 (#46269) (#46271)
* Fix flaky reproduction 21559

* Improve the test structure and assertions

* Remove the flaky tag

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-30 14:37:12 +00:00
github-automation-metabase
2357b28855 [perf] Fix memoization based on dashboard_load_id (#45809) (#46204)
The `dashboard_load_id` is attached to the body for queries, not as a
query parameter. This correctly receives the `dashboard_load_id` and
uses it for `/query` calls.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-07-30 13:19:35 +00:00
github-automation-metabase
0f8b7e696a build: disable licenses generation for e2e tests (#46225) (#46260)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-30 11:23:05 +00:00
github-automation-metabase
8447b93830 Increase slack upload timeout to 20 seconds (#46235) (#46246)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-07-29 19:32:16 +00:00
github-automation-metabase
6bd084a298 [perf] Better CLJC memoization; bounded strategy, fast versions (#46199) (#46241)
Expands and refactors `metabase.util.memoize` to support better cross-platform memoization.

**Better basic memoization**

Use `clojure.core.memoize/memo` (and its clone in CLJS) rather than `clojure.core/memoize` for
the "everything forever" strategy.

**Bounded memoization**

There are a few places (eg. `u/kebab-case-en`) where we want zero-overhead *hits* and expect the input space
to be fixed. To guard against runaway memory usage, this **bounded** strategy dumps the entire cache when it
overflows. It logs an INFO level note when that happens - the intent here is that the threshold should never
actually get hit!

**Fast JVM versions**

In the special case where the function to memoize takes exactly 1 argument which is a valid map key, we can
use `ConcurrentHashMap.computeIfAbsent` as the basis of the cache and have much less overhead.

`fast-memo` and `fast-bounded` implement this in CLJ; in CLJS they just call `memo` and `bounded`.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-07-29 17:43:42 +00:00
github-automation-metabase
381212d7d5 Infer id numeric columns as non metrics (#45662) (#46239)
* infer id numeric columns as non metrics

* update spec

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-07-29 16:05:24 +00:00
github-automation-metabase
bd4eaebd27 Structure e2e API helpers (#46041) (#46217)
* Refactor dashboard helpers to TypeScript

* Reuse existing helper

* Refactor cy.createQuestionAndDashboard to a function helper
- there was no good place to put it, so I also created new helpers/api directory
- and I moved all helpers using cy.request (with 1 exception, where a CSV download helper also does a bunch of assertions) in there

* Merge TS command definitions into a single file

* Export types

* Make dashboardDetails optional

* Export StructuredQuestionDetails

* Remove duplicated function

* Extract createNativeQuestion to separate file
- 1 exported helper per file, no exceptions!

* Reuse const

* Remove old definitions

* Add missing export

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-29 15:41:49 +07:00
github-automation-metabase
5fbf5709de 🤖 backported "Skip long values in JSON unfolding query" (#46186)
Co-authored-by: Cal Herries <calherries@gmail.com>
2024-07-29 10:50:44 +03:00
github-automation-metabase
2a0f84822c Fix the homepage dashboard being loaded everywhere (#46210)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-26 21:27:26 +00:00
github-automation-metabase
e6715643c5 Remove unused dimension options from query_metadata (#46195) (#46205)
* Remove unused dimension options

* Fix test

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-26 20:28:28 +00:00
github-automation-metabase
8fc28c9302 link fixes (#46200) (#46207)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-26 20:01:52 +00:00
github-automation-metabase
5393b7f964 [perf] Add a test for the Clojure-side lib.cache/side-channel-cache (#46133) (#46190)
This was missed in the original PR #45394 due to clumsy `git`
wrangling; my bad.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-07-26 18:48:02 +00:00
github-automation-metabase
9cf2659d2d Add v0.50.17 to the list of releases (#46197) (#46198)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-07-26 13:52:28 -04:00
github-automation-metabase
a7b54b36b6 Filter invalid recent and search items in move modal (#46086) (#46196)
* filter invalid recent and search items in move modal

* e2e test disabled moving search and recent items

* update test

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-07-26 17:21:56 +00:00
github-automation-metabase
afd6b17a62 Add Azure managed identity support (#46011) (#46164)
---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Case Nelson <case@metabase.com>
2024-07-26 17:51:52 +03:00
github-automation-metabase
afd1803ffa Add e2e tests for 45831 - instance analytics db appearing in permissions (#46061) (#46187)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-07-26 14:19:45 +00:00
github-automation-metabase
fa883b87d1 🤖 backported "fix(admin/performance): Fix default time bug in Schedule policy" (#46159)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-07-26 10:17:30 -04:00
github-automation-metabase
82fa845b33 🤖 backported "Some Email/Attachment Improvements and Fixes" (#46169)
* fix conditional formatting color lookup with correct col names

The column names for color lookup are expected to be the same as the :name key of each column, and applying column
formatting broke this lookup. This fixes it.

* move overflow-x into pulse body div to exlude card title from scroll

* add a test for conditional formatting w/ a hidden row.

This still fails at the moment, working on a fix yet.

* apply conditional formatting in static viz even when col is hidden

Conditional formatting that depends on a hidden column was not being rendered in the static viz, but now we pass all
columns into the color selector fn, thus when rendering the table with the ordered/hidden columns, all other columns
will still use their appropriate conditional formatting

* I missed a linter warning

* fix tab rendering

* fix test

* fix up tests with some better structural searching

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-07-26 07:09:17 -04:00
github-automation-metabase
d9f3897e82 Refactor e2e dashboard helpers to TypeScript (#46037) (#46121)
* Refactor dashboard helpers to TypeScript

* Reuse existing helper

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-26 08:51:45 +00:00
github-automation-metabase
04d71d91ed e2e: Fix dashboard card resizing flake (#46158) (#46165)
* Do not store elements in a `const`

* Remove mid-test save and edit dashboard

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-25 21:59:50 +00:00
github-automation-metabase
54d1cb982f Request-level caching for sandboxes (#46138) (#46155)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2024-07-25 18:46:10 +00:00
github-automation-metabase
4300fabc57 fix(webapp): Localize 'Settings' in command palette (#46124) (#46153)
Closes #46123

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-07-25 17:04:02 +00:00
Anton Kulyk
813423dc8c Manual backport — Fix document title when opening a multi-series question from dashboard (#46130)
* Add repro

* Fix onOpenQuestion uses unexpected card object
2024-07-25 17:31:14 +01:00
github-automation-metabase
62c8ad4303 add skip_graph to coll perm PUT (#45438) (#45518)
* add skip_graph to coll perm PUT

- also no longer ignores revision and groups
  so we don't print this warning:
  2024-07-11 16:17:32,293 WARN api.common :: Unexpected parameters at [:put "/api/collection/graph"]: [:revision :groups]

* namespace should be a keyword

* decode the keyword

* add a typehint to avoid reflection

* Adds test for skip_graph

* handle revision 0 🤦

Co-authored-by: bryan <bryan.maass@gmail.com>
2024-07-25 16:04:23 +00:00
github-automation-metabase
bb1f8f1072 Bigquery Pagination Use next page to get proper results (#46095) (#46144)
* Bigquery Pagination Use next page to get proper results

Fixes 45953

WIP

* use new-page in values-iterator

* disable just the part of the test that is still flaky

Want to keep the other part of the test that does prove we're not getting duplicates due to incorrect pagination.

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-07-25 16:03:23 +00:00
github-automation-metabase
2a8ef957d4 [E2E] Rewrite and expand repro #27643 (#45887) (#46145)
* Rewrite repro for 27643

* Add TODO for the remaining tasks

* Make a test name consistent with others

* Finish the E2E test for #27643

* Fix the test to use PostgresDB

Since H2 originally doesn't fail the test

* Attempt to fix a flake on CI by waiting for table to finish syncing

* Create QA snapshot with fully synced field metadata

* Fix failed tests from field metadata change

* Simplify question scenarios

* Simplify dashboard scenarios

* Fix permissions

* Rework titles

* Add comment about PG

* Add limit to speed things up

* Fix and improve dashboard assertions

* Fix and improve question assertions

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-07-25 15:41:56 +00:00
github-automation-metabase
3988bb7ac7 Make the sandbox cleanup logic more robust, and reorganize some perms code for better testing (#46102) (#46136)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-25 15:06:38 +00:00
github-automation-metabase
d505269b24 Number formatter Reports correct Decimal places for negative Numbers (#46104) (#46135)
* Number formatter Reports correct Decimal places for negative Numbers

Fixes #41640

Prior to this, the number formatter would get the incorrect number of decimal places for negative numbers.

The way the decimal places count is derived works as follows:

 - convert number to a string
 - split the string on the separator (decimal, comma, whatever the instance has set)
 - destructure that split into [int decimal]
 - count decimal to get the number of decimals.

That all works for positive numbers, but for negative numbers, the regex was just splitting on 'not digits', so we got
an extra group due to the leading negative sign. This would incorrectly destructure  the 'int' part of the number into
the count, thus we would always get 1 instead of the correct value.

This fixes it by just taking last instead of destructuring.

* correct comparison to always use abs value in conditonal check

* tiny incorrectness in the test

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-07-25 15:03:23 +00:00
github-automation-metabase
3fb6bcb651 🤖 backported "ci: Fix request timeout in E2E dashboard filters flake" (#46107)
* ci: Fix request timeout in E2E dashboard filters flake (#46091)

* Make filter corrupted again™

* Speed up the test by limiting the number of rows

* Make the repro more correct, and more resilient

* Remove intercepts

* Improve assertions

* Fix the test

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-25 14:51:12 +00:00
github-automation-metabase
5fd3a0bbf8 Add v0.50.16 to the list of releases (#46118) (#46141)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-07-25 14:35:42 +00:00
github-automation-metabase
0813d74e59 Make drivers build in parallel rather than sequentially (#45897) (#46126)
* Make drivers build in parallel rather than sequentially

* Make the whitespace linter happy

* Add duration to steps

Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
2024-07-25 11:46:20 +00:00
github-automation-metabase
208d2aa323 Enable e2e repro for the issue #38181 (#46082) (#46125)
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-07-25 10:41:48 +00:00
github-automation-metabase
5f922c9f48 [perf] Add a Clojure-side impl for lib.cache/side-channel-cache (#45394) (#46114)
It's based on a (global, synchronized) `WeakHashMap` using the query map
itself as the key. That gives the cache the same lifespan as the query
map, which is generally brief but often includes many calls to
expensive, cached functions like `visible-columns`.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-07-25 07:59:31 +00:00
github-automation-metabase
28de9dfbb8 Fix comma in location.svg (#46056) (#46117)
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-25 06:35:00 +00:00
github-automation-metabase
cdbb88a4d7 Revert "fix: param-fields when native model is aggregated (#45068)" (#46108) (#46109)
This reverts commit 6495def057.

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-24 21:09:53 -04:00
github-automation-metabase
40dfa9ed3b docs - notes on view data vis (#46093) (#46099)
* notes on view data vis

* Update docs/permissions/data.md



---------

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-07-24 21:08:04 +00:00
github-automation-metabase
370d8f2739 note on projected coordinates (#46079) (#46098)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-24 21:06:51 +00:00
Jeff Bruemmer
01d77957dc remove caching env vars (#45943) 2024-07-24 17:48:33 -03:00
github-automation-metabase
8ffc6e73ce Fix broken details-only check in viz (#46052)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-24 19:31:52 +00:00
github-automation-metabase
2043e48235 🤖 backported "Embedding Parameter Values set in Tokens work properly when nil or empty list" (#46057)
* Embedding Parameter Values set in Tokens work properly when `nil` or empty list (#45771)

* Embedding Parameter Values set in Tokens work properly when `nil` or empty list

Fixes: #40292

If a locked parameter's value is set to `nil` or `[]` in the embedding JWT, we want to treat this as 'no value has
been set' on that filter, but we should still run the query as normal. Likewise, any linked filters should still
properly derive their values from the unfiltered values of the filter to which they are linked.

* when a parameter's value is nil or empty seq, don't include it

This is a partial solution as I still need to find the place that's still erroring on the empty list case in terms of
the linked parameter's values.

* Treat empty list like `nil` for the token param

When you're using a filter in the App, it makes intuitive sense that when you've not selected anything from a filter's
drop down list (or entered any text, etc.), then the filter is effectively not applied.

For token params, we should behave similarly; `nil` and `[]` can both be accepted, and signal that the user intends
for that filter to basically NOT apply.

This also means we should not pass the constraint to the linked filters, since it errors, but even if it worked, it
would return 0 results, making it impossible to properly apply the linked filter at all.

So, this change causes empty lists to be treated as nil, AND will remove any parameters with `nil` as a value before
being passed to the query processor, which results in the proper behaviour of not having constraints on the linked
filter, and having the 'parent' filter not filtering anything.

* Embed preview should always use params from the token

In making a screenshot, I discovered a slight bug in previews, where if the embed had been previously published, it
could pull embedding params from the db that don't match the settings on screen. So, always pull the settings from the
token, which updates as the user is making changes in the Preview Embed UI.

* for previews, merge the embedding params sources instead

* alter 'nil' behaviour to work just as if the key doesn't exist

* fix one spot where I was passing maps into set functions

* Adjust tests to check for consistent behaviour in dash/qstn embeds

* fix an e2e test

* fix up last 2 failing e2e tests

* add the test case of a locked param having no value set in token

* some further e2e changes

* this test wasnt supposed to be in this PR. oops

---------

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
2024-07-24 12:21:22 -07:00
Alexander Polyankin
ce7c23c153 [perf] Fetch query metadata with DB calls directly - v50 (#46077) 2024-07-24 18:37:21 +00:00
github-automation-metabase
b55463a013 Add v0.49.21 to the list of releases (#45658) (#45666) 2024-07-24 13:57:44 -04:00
github-automation-metabase
ffc4eded79 ci: Fix ace editor E2E typing flakes (#46048) (#46058)
* Rewrite startNewNative helpers

* Update existing tests

* Fix table hovercards E2E flake

* Fix repro 37009

* Update repro 30680

* Add comment

* Fix nested question flake

* Fix typo

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-24 17:33:52 +02:00
github-automation-metabase
fab11f44b5 🤖 backported "Skip syncing field values for oracle CLOB columns" (#46027)
Co-authored-by: Cal Herries <calherries@gmail.com>
2024-07-24 17:38:34 +03:00
github-automation-metabase
82ff826cd2 dx: clean output folder before building jar (#45911) (#46047)
* dx: clean output folder before building jar

* clean output only in prod mode

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-24 13:11:54 +00:00
github-automation-metabase
8defcd58f2 test: wait for element to be rendered in flaky test (#45978) (#46049)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-24 12:58:33 +00:00
github-automation-metabase
f0b8149d7c Add repro for 38041 (#46003) (#46046)
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-07-24 12:46:15 +00:00
github-automation-metabase
55ec1cf96a Require geojson to be json or plaintext (#45718) (#45955)
Also modify the tests to not actually make HTTP requests. We have the
clj-http-fake client which works well for this sort of thing.

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-07-24 12:41:21 +00:00
github-automation-metabase
43ad61f2c5 Make the translation artifacts build in parallel rather than sequentially (#45898) (#46000)
Co-authored-by: Luis Paolini <paoliniluis@gmail.com>
2024-07-24 10:58:01 +00:00
github-automation-metabase
3c0062da6f [perf] Only update ParameterCard when it changes (#45901) (#46035)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-07-24 10:20:49 +00:00
github-automation-metabase
58aac8f86a ci: Fix dashboard subscription E2E flake 24223 (#45993) (#46001)
* Rewrite reproduction for 24223

* Fix test

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-24 08:51:08 +02:00
github-automation-metabase
ab9bab5b98 🤖 backported "Make Redshift sync much more robust" (#46030)
* Potential Redshift sync flake fix

* Make Redshift sync much more robust

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2024-07-24 05:10:09 +00:00
github-automation-metabase
159cb353a6 Fix several problems with the localization of the Performance feature (#45773) (#46020)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-07-23 23:04:29 -04:00
github-automation-metabase
39e77c4091 Fix Analytics DB Appearing in Permissions (#45831) (#46008)
* what does this break?

* Revert "what does this break?"

This reverts commit 93e09edeb3.

* don't show audit db in permissions

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-07-23 22:25:40 +00:00
github-automation-metabase
c6c4d455c4 docs - mysql appdb note (#45956) (#46026)
* notes

* more notes

* edits

* update app db page

* file-based db mention

* anchor link

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-23 21:04:18 +00:00
github-automation-metabase
7a5f4ce7e3 don't trigger onChange when create dialog is open (#45989) (#46022)
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-07-23 19:28:29 +00:00
github-automation-metabase
4291860a3b Fix e2e-models-metadata flakes (#45995) (#46016)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-23 18:55:52 +00:00
github-automation-metabase
b0f659497f Add v0.50.15 to the list of releases (#46017) (#46018)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-07-23 18:34:13 +00:00
github-automation-metabase
9359344249 fix(admin): Parse cron expressions correctly in Safari v16.3 (#45654) (#45937)
* fix(admin): Don't use regex lookbehinds in Schedule utility functions since these fail on Safari 16.3

* Remove blank describe block

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-07-23 18:20:18 +00:00
github-automation-metabase
c6697cf474 Fix - Calendar widget jumps when switching months (#45803) (#45994)
* Add repro for #39487

* Refactor test

* Add repro for 'on' filter

* Fix metabase#39487

* Refactor test

* Change order of tests

* Improve assertions

* Group tests

* Add tests for filter pills

* Refactor tests

* Rename helpers

* Add filter modal tests

* Add tests for filter drill

* Add notebook tests

* Fix test

* Add one more repro

* Fix typo

* Optimize tests

* Simplify the fix
- apply the fix everywhere
- remove fix for width

* Update tests

* Improve comment

* Move min height to Calendar

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-23 14:55:18 +00:00
github-automation-metabase
16d0a80d2a dx: make fe stress test faster (#45980) (#45996)
* dx: make fe stress test faster

* uncomment

* invalidate cache and run in band

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-23 14:45:59 +00:00
github-automation-metabase
b2753bcbe6 Set validCheckSum for permissions migration to ANY (#45981) (#45990)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-23 14:29:36 +00:00
github-automation-metabase
1de8b2ba50 Fix editing models with metadata overrides (#45988)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-23 14:11:27 +00:00
github-automation-metabase
e6fc2bbf03 Add v0.50.14 to the list of releases (#45958) (#45991)
Co-authored-by: Metabase bot <metabase-bot@metabase.com>
2024-07-23 13:52:37 +00:00
github-automation-metabase
dfb90bc33f Fix the (object detail) flake for repro 39477 (#45973) (#45985)
* Fix the flake for repro 39477

* Expand the repro

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-23 13:07:12 +00:00
github-automation-metabase
71f4ff591f we had unlimited xrays since 2018 and it is time to end this madness (#45909) (#45966)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-07-23 12:05:38 +00:00
github-automation-metabase
44de06d2df ci: Fix the native snippet flake (#45976) (#45979)
* Wait for the native editor to be ready

* Add comment

* Make ace editor slightly more resilient to re-renderings

* Improve the test readability

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-23 11:50:42 +00:00
github-automation-metabase
8ec2a46ae9 [cache] remove mentions of removed cache settings from docs (#45921) (#45969)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-07-23 14:26:43 +03:00
Nemanja Glumac
d7ac58f9a1 ci: Quarantine dashboard-card-resizing flake (#45972) (#45974)
[ci skip]
2024-07-23 11:46:26 +02:00
github-automation-metabase
d79bc1340d Move parse-currency to util.jvm ns (#45939) (#45964)
* Move parse-currency to jvm-util ns

* Use util.jvm ns

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-07-23 07:26:22 +00:00
github-automation-metabase
abd012dd8a Add temporal bucketing to expression references (#45492) (#45965)
* Add test

* Add bucketing to expression references

* Restore original schema

* Update e2e test

* Update test as per review remarks

* Apply suggestions from code review



* Remove alignment

* Rename ::field-type-info

* Update log level

* Remove redundant log

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
Co-authored-by: Vamsi Peri <vamsi@metabase.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-07-23 06:57:49 +00:00
github-automation-metabase
04c4ae9430 Preserve display-name and long-display-name in aggregation expressions (#45502) (#45665)
Fixes #13437.

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-07-23 00:50:18 +03:00
Cam Saul
26d21b1f1e Redshift CI flake fix: enable robust sync behavior in tests (#45873) (#45945)
* I think this should fix Redshift test flakes

* PR feedback

* PR feedback

* Make some flaky X-Ray tests ^:mb/once
2024-07-22 22:19:03 +02:00
github-automation-metabase
4f2b7b1d2a 🤖 backported "Move desugar-host-and-domain to jvm-util" (#45868)
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-07-22 14:23:23 -04:00
github-automation-metabase
e92549a9ab 🤖 backported "Remove flakiness from e2e repro but move it to jail anyway" (#45797)
* Remove flakiness from e2e repro

* add to flaky group anyway

* add to flaky group anyway

* fixup! add to flaky group anyway

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-22 15:16:53 +00:00
github-automation-metabase
f4b25042fc Fix search field values with has_more_values: true (#45922) (#45931)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-22 14:58:52 +00:00
github-automation-metabase
39b6e9befc Speed up permission migrations by 95% under specific conditions (#45775) (#45855)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-22 14:53:15 +00:00
github-automation-metabase
8c7589a14d caching order (#45930) (#45934)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-22 14:47:27 +00:00
github-automation-metabase
03000f4ca3 Repro #28270, #33708 - Object relationships in nested questions (#45854) (#45913)
* Add repro for #28270

* Refactor assertions

* Add repro for #33708

* Fix typo

* Skip the repros

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-22 20:41:26 +07:00
github-automation-metabase
f6e5313119 Rename Azure AD to Microsoft Entra ID (#45863) (#45920)
* Rename Azure to Microsoft Entra ID

* adding a new screenshot

Co-authored-by: Abed Habli <154609371+abdhabli@users.noreply.github.com>
2024-07-22 13:24:18 +00:00
github-automation-metabase
2a4415503e ci: Run without Replay (#45799) (#45912)
* Uninstall ReplayIO

* Remove Replay config

* Install and use custom Chrome v111

* Simplify comment

* Set a specific Chrome version commit

* Skip repro for #22517

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-22 16:18:11 +03:00
github-automation-metabase
3eb13bd6b8 🤖 backported "test: add database feature to test identifiers with spaces" (#45805)
* tests for drivers with spaces in their identifiers

* Add driver feature

* Fix tests

* Remove ambiguous alias for sqlite

* Try to fix bigquery and sqlite tests not seeing left-join support

* Add explicit support for left-join because of foreign-keys during test hacks

* Handle left-join support weirdness

* Fix test

Co-authored-by: Case Nelson <case@metabase.com>
2024-07-20 16:00:22 -06:00
github-automation-metabase
d38d28108d 🤖 backported "fix: UUID filters across supported databases" (#45776)
* [WIP] Testing driver filters

* Only test returned values in CI

* Add :uuid-type for dbs that support that type (test oracle's support)

* Try again for oracle test, redshift does not support uuid-type

* Add tests, support where available

* Add empty/null tests

* Adjust test query for athena

* Reset logging

* Fix comments

* Add Athena uuid conversion

* Address PR review

* Add comments

* Address PR comments

* Use varchar for portability. Add inline uuid casting for athena

---------

Co-authored-by: Case Nelson <case@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-07-20 15:50:10 -04:00
github-automation-metabase
459306b1f0 🤖 backported "Support out of order expression references" (#45895)
* Support out of order expression references (#45872)

* Support out of order expression references
* Return just the cycle for cyclic expression references
* Prevent "yarn test-cljs" from testing twice

* Fix expected error

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Tamás Benkő <tamas@metabase.com>
2024-07-20 16:10:47 +00:00
github-automation-metabase
0c452096d8 fix: replacing joins and conditions updates alias (#45774) (#45888)
* fix: replacing joins and conditions updates alias

Fixes #37074

* Only change alias if conditions or table changed

* Fix test

* Fix fe test

* Address PR feedback

Co-authored-by: Case Nelson <case@metabase.com>
2024-07-20 04:14:40 +00:00
github-automation-metabase
71d4eaf47e 🤖 backported "Don't show Invalid questions for Joins in Query Builder" (#45861)
* Don't show Invalid questions for Joins in Query Builder (#45768)

* adds database_id to recents, and question collection items

* don't show unjoinable things in recents either

* unskip repro

* fix types

* fix repro

* fix tests in model/recent_views

* add unit test for invalid join in recents

* fix tests in test/metabase/api/collection_test.clj

* update type

* improve unit tests

---------

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

* fix recents tests

:collection-id vs :collection_id

---------

Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-07-19 22:37:25 -03:00
github-automation-metabase
4f4ce5257b Remove can_run_adhoc_query (#45881)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-20 00:55:48 +00:00
github-automation-metabase
59b9af6e6d Check for cardId being undefined in downloads (#45889)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-20 00:25:01 +00:00
github-automation-metabase
23e68513c4 🤖 backported "Add a repro for "Cannot create another filter value if it starts with the same value as an existing value"" (#45844)
* Add a repro for "Cannot create another filter value if it starts with the same value as an existing value" (#45837)

* Fix lint

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-20 00:09:05 +00:00
github-automation-metabase
15a4d19b16 Add basic auth params to dbms-version call on Druid (#45729) (#45867)
* Add basic auth to dbms-version

* Add test

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-07-19 18:10:55 +00:00
github-automation-metabase
cb701da6c0 fix: install frontend dependencies in dockerfile (#45802) (#45870)
* fix: install frontend dependencies in dockerfile

* do not skip optional deps

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-19 17:40:43 +00:00
github-automation-metabase
48b1c1aeba Sync Snowflake VARIANT type as new :type/SnowflakeVariant (#45674) (#45754)
* Sync Snowflake `VARIANT` type as :type/SnowflakeVariant`

* Test fix 🔧

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2024-07-19 17:20:56 +00:00
github-automation-metabase
25893cb423 Add .jar extension in example serialization command (#45849) (#45851)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-19 13:53:22 +00:00
github-automation-metabase
9ea41a357d fix tab actions not working in firefox (#45682) (#45772)
* fix tab actions not working in firefox

* add e2e test

* update e2e tests that need awaitRequest: false

Co-authored-by: Emmad Usmani <emmadusmani@berkeley.edu>
2024-07-18 17:28:03 -07:00
github-automation-metabase
46a7b744a5 🤖 backported "Fix parameter mapping in auto-wiring a new card" (#45827)
* Fix parameter mapping in auto-wiring a new card

* Fix the test for v50

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-18 20:18:25 -04:00
github-automation-metabase
cb6f55228b Exclude deactivated admins from legacy no-self-service email (#45726) (#45835)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-18 23:50:51 +00:00
github-automation-metabase
8509cb3596 🤖 backported "Allow only one action menu popover to be open at once" (#45719)
This also makes collections tabbable

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-07-18 23:40:55 +00:00
github-automation-metabase
ba59075170 update trend chart copy (#45814) (#45836)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-07-18 23:22:38 +00:00
github-automation-metabase
7265e297c0 Derive MySQLEnum from Text instead of TextLike (#45752) (#45834)
* Derive MySQLEnum from Text instead of TextLike

Fixes #44807.

This change is in accordance with https://dev.mysql.com/doc/refman/8.0/en/enum.html describing the ENUM types as a
kind of string.  All our string operations seem to work with MySQL ENUM fields.

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-07-18 22:59:45 +00:00
github-automation-metabase
e7d6f6fa4e fix(webapp/collections): Tweak the height of action menu items so they align well with icons (#45618) (#45833)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-07-18 22:07:09 +00:00
github-automation-metabase
b3d0f2a7e8 🤖 backported "E2E repro for Field Filter's Default Value Not Working on Dashboard" (#45826)
* E2E repro for Field Filter's Default Value Not Working on Dashboard with UNIX timestamp (#45811)

* Fix helper

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-18 20:54:01 +00:00
github-automation-metabase
95f5c04ab9 docs: extract requires a db with regex (#45828) (#45830)
* docs: extract requires a db with regex

* Update docs/questions/sharing/visualizations/table.md



---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-18 20:31:44 +00:00
github-automation-metabase
fe8938a990 docs - json filter limitation (#45822) (#45829)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-18 20:19:30 +00:00
Jeff Bruemmer
fe1d77c663 update env vars (#45825) 2024-07-18 16:16:26 -04:00
github-automation-metabase
cc4b6d8db3 Remove stupid perf unit test (#45812) (#45819)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-07-18 18:34:21 +00:00
github-automation-metabase
1eda7529b3 45749 follow up: guard against the potential null (#45796) (#45798)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-18 15:27:08 +00:00
github-automation-metabase
7f8b3fc220 🤖 backported "Fix - App crashes when navigating back during model creation" (#45782)
* Fix - App crashes when navigating back during model creation (#45709)

* Refactor EditoTabs
- get rid of options prop
- use named export

* Remove unused data-testid

* Remove redundant id and aria-labelledby

* Remove redundant props spread

* Bring back data-testid in use
- Thanks VSCode for randomly showing me search results or not...

* Fix navigation issue

* Add a repro for first issue

* Adjust EntityPickerModal root element so that it works with "be.visible" assertion in Cypress

* Add a repro for second issue

* Refactor tests
- Fix not enough history entries issue

* Change order of tests to start with simpler one

* Fix invalid request issue

* Add more assertions

* Format code

* Try to fix a flaking test

* Add waits to fix a flaky test

* Add one more wait

* Fix order of commands

* Improve flaky test

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-18 11:40:30 +00:00
github-automation-metabase
3c9e1ac24e Do not render ExecutionTime if there is no time to format (#45749) (#45789)
* Do not render if there is no time to format

* Add a unit test

* Render time if 0

* Simplify the logic with explicit check for `undefined`

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-18 10:15:57 +00:00
github-automation-metabase
7eefc8472f Bulk filter modal incorrectly suggests that you can filter by values in a JSON column (#45748) (#45769)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-18 01:10:04 +00:00
github-automation-metabase
5290925285 🤖 backported "Field Filter Value Normalization in Embedding Endpoints" (#45767)
* Field Filter Value Normalization in Embedding Endpoints (#45447)

* Field Filter Value Normalization in Embedding Endpoints

Fixes 27643

Since we use query-params to pass paramter values, we have to normalize the parameter map values.

This PR is a WIP, as I'm trying to find a way to do this hollistically/properly.

First commit here is mostly as a marker for where to start working on this properly, as I think the json parsing won't
catch all cases, nor should the normalization happen without some attempt to use a schema to properly validate, maybe
even coerce things.

* read strings if boolean or numbers, replace blank str with nil

Also update the common dashboard param values fn to use embedding params from the URL blob if the app db doesn't have
embedding params. This happens upon first preview where nothing will have been written to the Appdb yet.

* Add query-param normalization test, add related embedding test

* schema didn't work in this case after all.

Worth a shot, but don't want this to block the PR, so reverting to the previous schema

* Add comment pointing out the downsides/reasons for this solution

It's nto a perfect solution, but it's probably the best we can get at the moment, without adding a new filter
type (boolean) and/or improving the design of hte embedding endpoints and how filters/parameters work

* empty commit to unstick CI

---------

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
2024-07-17 23:06:13 +00:00
github-automation-metabase
a598ba5dc0 Preprocess queries before data perms check (#45601) (#45762)
When we run queries, we preprocess them, during which the sandboxing
middleware adds information that we use when checking permissions
later on in query processing.

When we checked data permissions before saving a card, we were checking
permissions on the raw query, without preprocessing. Without the data
provided by the sandboxing middleware, the permission check sometimes
failed (depending on the permissions for other tables in the DB).

Note the big hack here: preprocessing can fail, for lots of reasons.
This broke a *lot* of tests that were passing in invalid queries. If an
exception occurs during preprocessing, we catch and just use the
original query like we were before.

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-07-17 20:07:46 +00:00
github-automation-metabase
b7217c4dd7 Fix deserialization of mongo native query string (#45566) (#45758)
* Fix deserialization of mongo native query string

* Add test

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-07-17 19:13:17 +00:00
github-automation-metabase
b404b3cd2f 🤖 backported "Add fallback filter widgets for uncommon (or unknown by Metabase) data types" (#45750)
* Add fallback filter widgets for uncommon (or unknown by Metabase) data types

* Fix type

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-17 15:02:09 -04:00
github-automation-metabase
ad55b863c7 Repro #33327: Visualization does not recover from an error in native query editor (#45715) (#45724)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-17 14:40:19 +00:00
github-automation-metabase
5d1ebb765f Refactor EditorTabs component (#45705) (#45721)
* Refactor EditoTabs
- get rid of options prop
- use named export

* Remove unused data-testid

* Remove redundant id and aria-labelledby

* Remove redundant props spread

* Bring back data-testid in use
- Thanks VSCode for randomly showing me search results or not...

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-17 14:28:36 +00:00
github-automation-metabase
8e7dc23c1c Fix offset error (#45693) (#45710)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-17 13:41:09 +00:00
github-automation-metabase
f4e717a789 Alert on asset download error (#45444) (#45675)
* Alert on asset download error

* moving function to metabase global

* removing alert, adjusting e2e test

* update CSP

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-07-17 12:29:47 +00:00
github-automation-metabase
48bc433959 Fix pulse being sent multiple times (#45703) (#45706)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-07-17 11:02:52 +00:00
github-automation-metabase
72830250e5 Refactor perms middleware to enforce view-data at the table-level (#45615) (#45690)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-16 23:25:59 +00:00
github-automation-metabase
356ddd5946 fix: add timezone to bigquery param substitution (#45661) (#45688)
* fix: add timezone to bigquery param substitution

Fixes #43597

* Fix indentation and remove report-timezone lookup from loop

Co-authored-by: Case Nelson <case@metabase.com>
2024-07-16 23:13:08 +00:00
github-automation-metabase
8c9bda5bc1 Adjusting unit tests (#45643) (#45676)
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-07-16 20:26:10 +00:00
github-automation-metabase
bd9644eaf3 Fix field values endpoints in public & embedded dashboards (#45668)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-16 20:20:31 +00:00
github-automation-metabase
1c588305b2 Skip fetching collection permissions graph on update (#45561) (#45621)
* updates the fe to skip refetching the graph when updating the collection graph, adds tests

* Moves the skip_graph flag to be part of the body.

- the FE tooling makes it awkward for PUTs to include query params

* fixes failing unit tests

* pr feedback

---------

Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
2024-07-16 18:49:10 +00:00
github-automation-metabase
c22bfd5557 Optimize autocomplete filters in FilterModal (#45648)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-16 17:04:05 +00:00
github-automation-metabase
2287093179 Fix typo in a task fetching error message logic (#45652) (#45655)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-16 16:49:38 +00:00
github-automation-metabase
356ede50ee [QP] Test :results_metadata disambiguates column names eg. ID_2 (#45109) (#45649)
This makes the names inconsistent with what's in `data.cols` on the same
API response(!) but consistent with what MBQL lib will return.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-07-16 16:47:00 +00:00
github-automation-metabase
ca1bdef1cf Import updated translations (#45607) (#45614)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-07-16 16:42:33 +00:00
github-automation-metabase
d04ec9e5d8 Fix string filters with multiple values in dashboards (#45646)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-16 15:45:30 +00:00
github-automation-metabase
034cbe3c03 Fix - useIsTruncated gives incorrect results (#45625) (#45644)
* Get rid of tolerance

* Use range rect and element rect instead of clientWidth/clientHeight/scrollWidth/scrollHeight

* Fix types

* Mock Range.prototype.getBoundingClientRect

* Mock getBoundingClientRect in unit tests

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-16 14:22:37 +00:00
github-automation-metabase
39f38bbe51 docs - clarify caching policy interactions (#45584) (#45645)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-16 14:03:27 +00:00
github-automation-metabase
6f608f7e6d Fix - Data source picker sources not refreshed after archiving a question (#45570) (#45636)
* Add repro for #32252

* Have a test for archiving a question and a collection

* Refactor cy.createCollection and cy.archiveCollection to TS

* Refactor collection and user helpers to TS

* Keep collection helpers together

* Sort code

* Format code

* Use new createCollection helper

* Add return type to createCollection

* Fix typing

* Fix #32252

* Fix typing

* Deprecate openNewCollectionItemFlowFor

* Revert "Fix typing"

This reverts commit ecf3179868.

* Fix TS error

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-16 12:36:44 +00:00
github-automation-metabase
bb86fd2e34 prevent moving snippet collections into descendents, remove recents tab (#45477) (#45597)
* prevent moving snippet collections into descendents, remove recents tab

* PR feedback

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-07-16 12:02:33 +00:00
github-automation-metabase
078d32fca5 Refactor e2e collection helpers and commands to TS (#45624) (#45630)
* Refactor cy.createCollection and cy.archiveCollection to TS

* Refactor collection and user helpers to TS

* Keep collection helpers together

* Sort code

* Format code

* Add return type to createCollection

* Fix typing

* Deprecate openNewCollectionItemFlowFor

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-16 11:13:41 +00:00
github-automation-metabase
f50185c96b 🤖 backported "Fix - More than 10 Series (using Add Series Dashboard Feature) cause Filter UI to be inaccessible" (#45623)
* Fix - More than 10 Series (using Add Series Dashboard Feature) cause Filter UI to be inaccessible (#45550)

* Add a repro for #43219

* Fix #43219

* Create questions in parallel

* Make 2 elements scrollable so that the 'Make sure to make a selection ...' element is not weirdly cut off when scrolling horizontally to see inside of parameter-mapper-container

* Fix assertion

* Be more specific which element is to be scrolled

* Avoid realMouseWheel which does not work reliably in CI

* Fix conflict
- Partially port changes from https://github.com/metabase/metabase/pull/43323
- Partially port changes from https://github.com/metabase/metabase/pull/43816

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-16 09:28:46 +00:00
github-automation-metabase
185c66988b remove unnecessary explicit size (#45612) (#45617)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-07-15 22:53:59 -04:00
github-automation-metabase
f3fa02773c fix(sdk): Remove default Count aggregation without triggering a query update (#45556)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-16 02:41:37 +00:00
github-automation-metabase
4f4374aee0 🤖 backported "fix cache config migration fails with float setting on mysql" (#45559)
* fix cache config migration fails with float setting on mysql (#45539)

* update check sum of v50.2024-06-12T12:33:08 migration that was changed in #45539 (#45563)

---------

Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-07-16 02:20:48 +00:00
github-automation-metabase
2b6c8845f8 E2E repro for "Selecting Exclude Hours of the day from Date Filter doesn't give the option to deselect 12:00 am" (#45603) (#45605)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-15 21:51:36 +00:00
github-automation-metabase
ff6bd5f38c 🤖 backported "fix: limit xrays on agg models to source fields" (#45191)
* fix: limit xrays on agg models to source fields

Fixes #43793

1. `table-like?` was checking aggregations but not breakouts. This meant
   that legacy metric definitions would try to apply to the second stage
   which is generally illegal and would cause things like implicit joins
   to come in where they make no sense.
2. Trying to bin a `count` metric-like model would give a bin span of
   0.0 which would blow up those questions.
3. Trying to self reference breakout fields, in the precense of a
   question's  aggregation meant that most fields would not be exposed to
   the next stage and should be ignored. (similar to 1.)

* Fix tests

Co-authored-by: Case Nelson <case@metabase.com>
2024-07-15 21:23:06 +03:00
github-automation-metabase
23d25fc2c3 E2E repro for "Admins can't create queries on Metabase Analytics models" (#45555)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-15 14:45:50 +00:00
github-automation-metabase
d6185eb4c0 notes on regexextract (#45442) (#45568)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-15 14:35:53 +00:00
github-automation-metabase
74af470439 add 50.13 to list of releases (#45562) (#45564)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-15 14:24:08 +00:00
github-automation-metabase
db0e2b8a48 Fix underlying records drill from pivot tables (#45507) (#45557)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-15 13:53:31 +00:00
github-automation-metabase
54dce5dd4a update supported DB version for postgres to 12. 9.5 is out of support 3 years ago (#45535) (#45560)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-07-15 13:37:42 +00:00
github-automation-metabase
5192fa1721 add support for disabled command palette items. Make search states disabled (#45432) (#45547)
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-07-15 12:23:56 +00:00
github-automation-metabase
1c4a62931d Add missing type in the base64 string for cards (#45482) (#45544)
* Pass missing type to clean card in url

* Add reproduction for #34517

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-07-15 10:59:59 +00:00
github-automation-metabase
b9fb7d6aa0 🤖 backported "Repro #42949 - Create column actions always visible" (#45542)
* Repro #42949 - Create column actions always visible (#45487)

* Add repro for #42949

* Add more repros for #42949

* Update test

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-15 16:50:58 +07:00
github-automation-metabase
2086968466 🤖 backported "Repro #23857 - Inconsistent and confusing "Duplicate" action mechanism" (#45540)
* Repro #23857 - Inconsistent and confusing "Duplicate" action mechanism (#45465)

* Add repro for the frontend part of metabase#23857

* Avoid cy.visit

* Update label

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-15 09:08:59 +00:00
github-automation-metabase
652d350026 🤖 backported "Temporarily disable tracking field usage" (#45541)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-07-15 05:00:13 -04:00
github-automation-metabase
7f53e98288 🤖 backported "do not allow to render empty SaveQuestionModal content" (#45515)
* do not allow to render empty SaveQuestionModal content (#45476)

* do not allow to render empty SaveQuestionModal content

when question is already saved and QB rerenders still open SaveQuestionModal there is a moment when content is empty before modal is closed

* fixup! do not allow to render empty SaveQuestionModal content

* add missing importg

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
2024-07-15 08:26:26 +00:00
github-automation-metabase
18c9eda731 Do not reset table.columns when some column is deleted (#45509) (#45517)
* Do not reset `table.columns` when some column is deleted

* Do not reset `table.columns` when some column is deleted

* Fix

* Fix

* Make API calls more obvious

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-14 21:22:43 -04:00
github-automation-metabase
15dd18e4ff Sync table.columns and graph.metrics viz settings based on the desired column alias (#45522)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-14 20:22:24 +00:00
github-automation-metabase
0ae2ee8406 🤖 backported "Remove field ref matching from table.columns" (#45523)
* Remove field ref matching from table.columns

* Fix flaky test

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-14 12:23:35 -04:00
github-automation-metabase
62d2e4bbaf 🤖 backported "Fix excessive series order settings crash static cartesian chart" (#45521)
* fix legend order (#45446)

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-07-12 22:09:23 -04:00
github-automation-metabase
126da086c6 🤖 backported "Fix type/PK -> type/Name and type/FK field remapping in the QB" (#45467)
* Fix type/PK -> type/Name and type/FK field remapping in the QB

* Fix type/PK -> type/Name and type/FK field remapping in the QB

* Fix types

* Make API calls more obvious

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-13 00:45:15 +00:00
github-automation-metabase
a227ec6918 Add FE repro for the visual glitch when working with models that have an expression with the same name as the column (#45503) (#45516)
* Add FE repro for #35840

* Add FE repro for #35840

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-12 22:33:04 +00:00
github-automation-metabase
6ef26eba4c Fix model metadata tooltip visibility (#45508) (#45513)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-13 00:26:56 +02:00
github-automation-metabase
c61ce1330d Repro #26919 - Aggregating with Custom Column first doesn't show sub-totals in pivot table (#45479) (#45514)
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-12 22:18:42 +00:00
github-automation-metabase
f2ef93d79f parallelize coll perm graph group lookup (#45256) (#45510)
* parallelize coll perm graph group lookup w/ core.async

* respond to code review

* add + uses ExecutorCompletionService map function

* rename test

* more tests

* no concurrency for cljs

* fix timeout + add more tests

* use claypoole

* cleanup

* add kondo hooks for claypoole

* cleanup

* Can't use libraries that don't have a license

Revert "add kondo hooks for claypoole"

This reverts commit 9d93b55b28.

* ignore unused value

-- TODO: check back in on claypoole to see if the kondo config gets merged

* fix linter

Co-authored-by: bryan <bryan.maass@gmail.com>
2024-07-12 21:46:41 +00:00
github-automation-metabase
f16a9e9db5 Repro #44435: Long text filters overflow the window width (#45377) (#45453)
* Add reproduction for #44435

* Fix and skip the repro

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-12 22:52:18 +02:00
github-automation-metabase
3f8f506b05 Fix pivoted table crash (#45485) (#45506)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-12 19:52:33 +00:00
github-automation-metabase
e2e0184333 Fix deselecting the last join column (#45475) (#45504)
* Fix fields in joins

* Fix deselecting the last join column

* Update frontend/src/metabase/query_builder/components/notebook/steps/JoinStep/JoinStep.unit.spec.tsx



* Fix reference

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-12 19:25:10 +00:00
github-automation-metabase
86d4671282 Don't set :max-rows in search (#45443) (#45496)
This was a huge footgun.

We were accidentally limiting *ALL* queries run in our transducer to
1000 results. This included the query to fetch permissions, so when we
checked permissions we were checking a small percentage of your *actual*
permissions (e.g. 1000 / ~6300 for me on stats).

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-07-12 16:37:25 +00:00
github-automation-metabase
6b2f81cefb refactor: do not spread props to QueryModals (#45459) (#45495)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-12 16:14:10 +00:00
github-automation-metabase
5bdaadaeac Preserve type namespace of base-type in legacy-expression-for-expression-clause (#45331) (#45493)
* Preserve type namespace of base-type in legacy-expression-for-expression-clause

Fixes #44584.

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-07-12 16:01:17 +00:00
github-automation-metabase
5bac46fee5 [perf] Fix remaining thread leak in BigQuery query execution (#45253) (#45478)
This comes in two parts.

**Rebuilt query logic**

I rewrote the query exec logic to use one `future` and one `a/go` block,
reporting results to a `promise`. This is easier to follow and doesn't leak
threads like the original implementation with two `future`s.

The single future is guaranteed to exit. It blocks on the BigQuery call.
That will either complete or throw an exception. Either the exception or
the BigQuery result is sent to the promise, and then the future is
complete. The only reference to that future is overwritten after the `promise`
resolves, so the `future`, its closure, and its thread don't persist longer than needed.

**Return a reducible result**

Previously the results were returned as a lazy sequence, but that brings
a lot of `seq` overhead, and is a risk of retaining the entire result
set in memory until the query is all done. Above all, it doesn't support
`reduced?` to explicitly drop any further results.

The `thunk` function style of `qp.reducible/reducible-rows` doesn't fit
neatly here, so I implemented the reducible logic directly on top of the
`Iterable` BigQuery results.

**Verifying**

This is a bit tricky. I've been testing it like this:

- Add a BigQuery database to my instance
- Create a saved question and note its ID (say, 123)
- Create an API key in (EE) Metabase and save it in an env var
- Install the `siege` load testing tool
- Install VisualVM and monitor my Clojure REPL process's thread count
- `siege --concurrent=15 --time=30s --header="x-api-key: $API_KEY" "http://localhost:3000/api/card/123/query POST"`

That will create a bunch of new threads while it's getting called, but
within a minute of the last queries they'll gradually drop out of the
thread pools and it will return to the baseline number of threads.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-07-12 10:58:01 -04:00
github-automation-metabase
ce76b74c2e 🤖 backported "Implement transfer queues for performing async backfills" (#45466)
* Implement transfer queues for performing async backfills (#45408)

* Refer to old position of helper

* It's private

---------

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
Co-authored-by: Chris Truter <chris@metabase.com>
2024-07-12 12:57:15 +00:00
github-automation-metabase
9dcde64adb [serdes] spec check requires up-to-date db (#45455) (#45474)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-07-12 12:54:06 +00:00
github-automation-metabase
956b6f6afa Update fast-loops (#45415) (#45472)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-12 12:14:33 +00:00
github-automation-metabase
5c95b6966b Do not show revert button for default parameter (#45216) (#45456)
* Coerce value to array

* Add reproduction for #38083

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-07-12 10:37:38 +00:00
github-automation-metabase
03195c0810 🤖 backported "Fix - Ellipsis tooltip cut off/not visible in GUI editor" (#45089)
* Fix - Ellipsis tooltip cut off/not visible in GUI editor (#45030)

* Fix #39771

* Add repro for #39771

* Add explanatory comment

* Fix z-index

* Use Mantine Tooltip in Ellipsified to fix z-index issues

* Revert "Fix z-index"

This reverts commit 951e3dca86.

* Revert "Fix #39771"

This reverts commit 4165da5022.

* Update repro to new tooltip

* Update assertions

* Try to fix flake

* Try to fix flake

* Disable Replay to see if it affects tests

* Revert "Disable Replay to see if it affects tests"

This reverts commit e44d9a0a6f.

* Revert "Try to fix flake"

This reverts commit e2f23eb597.

* Revert "Try to fix flake"

This reverts commit 0df6554b38.

* Update assertion and add an explanatory comment

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-12 10:02:25 +00:00
github-automation-metabase
d957834da7 🤖 backported "funnel chart handle duplicated steps" (#45435)
* funnel chart handle duplicated steps (#45333)

* handle duplicated funnel chart steps

* fix import

* Update Loki Snapshots

* drop dynamic viz stories for funnel since the setup code is not in the release branch

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2024-07-11 18:32:40 -04:00
github-automation-metabase
08e2a285fb [serdes] allow entity ids in targets (#45290) (#45439)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-07-11 20:13:26 +00:00
github-automation-metabase
b5cd10756b 🤖 backported "Fix the markdown preview in model details" (#45437)
Co-authored-by: Nemanja <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-11 19:51:33 +02:00
github-automation-metabase
b71fddc0de [serdes] use spec instead of a pipeline for Card (#45209) (#45423)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-07-11 17:23:49 +00:00
github-automation-metabase
7a52afb4a5 Restore foreign key support (#44572) (#45436)
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-07-11 16:31:38 +00:00
github-automation-metabase
af2e86dd0d Fix broken docs link (#45418) (#45434)
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-11 15:50:34 +00:00
github-automation-metabase
4baa9e5980 Dashboard Paramter Value Now Works in Preview Embed (#45265) (#45399)
* Dashboard Paramter Value Now Works in Preview Embed

Fixes: #44962

Prior, a common util fn used both in the embed and preview_embed endpoints was causing the preview_embed to error out
when fetching dashboard parameter values because it was checking if embedding was enabled. This check is needed for
the normal embedding endpoints, but we want the preview embed endpoints to work without needing to publish the
dashboard first.

* pass proper args

* put args back in proper order.

oops

* change form back to previous, but keep preview check

* autocorrect mistake? Or perhaps a silly typo?

* change one test to show that the preview flag is working

Didn't create a whole new test for this flag as it is provable just by adjusting this test to not bother enabling
embedding on the dashboard.

* improve the docstring

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-07-11 15:31:18 +00:00
Alexander Solovyov
e7dc353ddd [backport] [serdes] more descriptive exceptions, a few error fixes (#45421)
* [serdes] a bit more descriptive exceptions (#45093)

* fix serialization errors we get on big old databases (#45177)
2024-07-11 17:55:50 +03:00
github-automation-metabase
fcd3f75355 fix: adjust Popover styles to avoid horizontal scroll on body (#45414) (#45426)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-11 14:47:15 +00:00
github-automation-metabase
48935b5884 Fix flaky collections test (#45370) (#45406)
- getAllCollectionItemNames was breaking the chain in Cypress, so assertions did not know how to wait for DOM to be updated

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-11 14:41:17 +07:00
github-automation-metabase
5c8523d171 Soft-delete defective duplicate fields (#45151) (#45395)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-07-11 03:24:18 +00:00
github-automation-metabase
8e0e985bd0 Fix and reproduce #45300: Broken filter modal when joining using FKs (#45304) (#45400)
* Add repro for #45300

* Remove empty line

* Fix

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-11 00:53:34 +00:00
github-automation-metabase
9c22eef361 🤖 backported "Add admin-only user-local setting that controls perms tutorial" (#45385)
* Add admin-only user-local setting that controls perms tutorial

* re-fix the manual backport

---------

Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
Co-authored-by: Bryan Maass <bryan.maass@gmail.com>
2024-07-10 20:51:37 -03:00
github-automation-metabase
093fd43759 Async coll perm graph revision (#45258) (#45396)
* Log changes when they make sense + async coll perm-graph revision

* - Make revision-number consistent

Decouples the creation of a revision number from the (potentially
expensive) writing of before and after for the coll perms-graph
revision.

* get id from the perms revision entity

* Move the revision id creation into the transaction

The revision id creation should only happen iff the perm updates went
through successfully.

* write a test that checks the incomplete revision

* remove sleep from tests

Co-authored-by: bryan <bryan.maass@gmail.com>
2024-07-10 23:25:36 +00:00
github-automation-metabase
5ca178d062 🤖 backported "Static Viz and Exports/Downloads Respect Dashcard Viz Settings" (#45387)
* Static Viz and Exports/Downloads Respect Dashcard Viz Settings (#45164)

* start adding some util fns to download-exports-test ns

* wip improving test util fns

* add subscription attachment util fn

* add tests to catch download/export differences

* viz-settings from card and dashcard  merged properly

* revert these changes which probably aren't needed

* split test: downloads can be parallel, email attachments cannot

* normalize viz-settings no matter their origin

* Update test/metabase/api/downloads_exports_test.clj

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>

* Incorporate some review feedback

* rendered table cards also respect column names

* Clean up table render tests and remove unhelpful render test utils

The big removal of code in the render test utils namespace is a clean up task that could've happened sooner, but this
table test adjustment is the perfect opportunity to clean up.

I had made the test utils before I truly knew how best to use `mt/with-temp`, so it had a lot of poorly implemented
'generators' that were doing a poor job of creating mock data for the rendering functions anyway.

So, reworking a few table tests here to just use a temp card is way more inline with the rest of the codebase, and
actually improves confidence that the tests are testing on well-formed data to begin with.

---------

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>

* Use pre-51 method for getting attachments

---------

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
2024-07-10 15:28:45 -07:00
github-automation-metabase
09e3d31214 Make import work on a fresh install (#45297) (#45389)
This introduces a new metadata on commands, `:requires-init`. If set,
we'll run `metabase.core/init!` before running the command. `init!` will
initialize the database and run our normal startup, though it won't
actually start the Metabase server.

This allows you to use

```
env MB_CONFIG_FILE_PATH=... java -jar metabase.jar import /my/metabase/export
```

We'll run the normal init process (creating the internal user, loading
from the config file, etc), then run the command.

On my machine this adds about 2-3 seconds to the time it takes to run an
`import`.

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-07-10 21:17:41 +00:00
github-automation-metabase
80aee3df9b docs - add note about parameters for datetime functions (#45388) (#45391)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-10 20:12:08 +00:00
github-automation-metabase
7d7978fb45 🤖 backported "Repro #45036: Multiple popovers can be opened simultaneously" (#45373)
Co-authored-by: Nemanja <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-10 16:27:59 +00:00
github-automation-metabase
b3e2ed0023 🤖 backported "fix incorrect y-axis extent computation" (#45326)
* cherry-pick fix incorrect y-axis extent computation

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2024-07-10 16:01:30 +00:00
github-automation-metabase
419561092c Repro #45359 - Incorrect font in e2e tests in CI (#45274) (#45366)
* Add a test verifying that fonts are loaded

* Verify font is mentioned in HTML

* Bring back working assertions

* Add wait

* Disable speedy

* Disable CSP and emotion cache

* Revert "Disable CSP and emotion cache"

This reverts commit 573e99bfa4.

* Revert "Disable speedy"

This reverts commit 6f9962b869.

* Don't use local fonts

* Revert "Don't use local fonts"

This reverts commit 17c58aa73d.

* Force Lato

* Fix storybook file name

* ESLint

* Add more !important

* Revert !important

* Add font-family assertion

* Move test

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-10 15:11:41 +00:00
github-automation-metabase
eed6deb9b4 🤖 backported "perf: pass uuid to BE to enable metadata caching during fetching dashboard" (#45329)
* perf: pass uuid to BE to enable metadata caching during fetching dashboard

* fixup! perf: pass uuid to BE to enable metadata caching during fetching dashboard

* Add wildcard on interceptions

* Add tests

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-10 17:17:35 +03:00
github-automation-metabase
e7a568e1a6 Repro #40622: Filter modal UI breaks when there are many tables in a question (#45352) (#45363)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-10 14:13:24 +00:00
github-automation-metabase
0180198d6d Bump macaw to 0.1.65 (#45354) (#45357)
A bunch of small improvements, notably a timeout and support for MSSQL square bracket quotes.

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-07-10 12:58:13 +00:00
github-automation-metabase
63b55326b8 Add dialect based feature flags for macaw (#45234) (#45349)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-07-10 10:56:33 +00:00
github-automation-metabase
2f990a5a1b 🤖 backported "Fix removing idx_uniq_field_table_id_parent_id_name constraint" (#45336) (#45337)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-07-10 11:28:10 +02:00
github-automation-metabase
22842b8086 restrict open redirects imitating no host in them (#45278) (#45324)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-07-10 07:19:58 +00:00
github-automation-metabase
7cabcc3430 fix funnel chart settings crash on null (#45262) (#45328)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-07-10 01:13:24 +00:00
github-automation-metabase
a3b3f66603 warning for mysql (#45322) (#45330)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-09 21:45:42 +00:00
github-automation-metabase
d897223905 Exclude internal content when populating :has_question_and_dashboard for current user. (#45317) (#45321)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-09 21:26:02 +00:00
Nemanja Glumac
6239c46ca5 Add repro #31274 to the flaky test group (#45279) 2024-07-09 23:17:41 +02:00
github-automation-metabase
5dbeb93e84 fix object detail view is not scrollable on mobile (#45312) (#45319)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-07-09 19:34:04 +00:00
github-automation-metabase
596c8e0a24 docs: add releases (#45316) (#45320)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-07-09 19:02:44 +00:00
github-automation-metabase
a3d4314218 Fixes the formatting (#45308) (#45310)
Before
====

```
2024-07-04 15:54:39,084 INFO metabase.server :: Shutting Down Embedded Jetty Webserver
Exception in thread "Thread-9" java.util.IllegalFormatConversionException: f != java.lang.Long
2024-07-04 15:54:39,122 WARN db.liquibase :: (#object[liquibase.Liquibase 0x2b7e6614 liquibase.Liquibase@2b7e6614])
	at java.base/java.util.Formatter$FormatSpecifier.failConversion(Unknown Source)
	at java.base/java.util.Formatter$FormatSpecifier.printFloat(Unknown Source)
	at java.base/java.util.Formatter$FormatSpecifier.print(Unknown Source)
	at java.base/java.util.Formatter.format(Unknown Source)
	at java.base/java.util.Formatter.format(Unknown Source)
	at java.base/java.lang.String.format(Unknown Source)
	at clojure.core$format.invokeStatic(core.clj:5770)
	at clojure.core$format.doInvoke(core.clj:5764)
	at clojure.lang.RestFn.invoke(RestFn.java:423)
	at metabase.db.liquibase$wait_for_all_locks.invokeStatic(liquibase.clj:258)
	at metabase.db.liquibase$wait_for_all_locks.invoke(liquibase.clj:251)
	at metabase.db.setup$release_migration_locks_BANG_.invokeStatic(setup.clj:175)
	at metabase.db.setup$release_migration_locks_BANG_.invoke(setup.clj:170)
	at metabase.db$release_migration_locks_BANG_.invokeStatic(db.clj:91)
	at metabase.db$release_migration_locks_BANG_.invoke(db.clj:86)
	at metabase.core$destroy_BANG_.invokeStatic(core.clj:90)
	at metabase.core$destroy_BANG_.invoke(core.clj:81)
	at clojure.lang.AFn.run(AFn.java:22)
	at java.base/java.lang.Thread.run(Unknown Source)
```

And now it will correctly log

```
2024-07-09 16:04:28,345 INFO db.liquibase :: Waiting for migration lock(s) to be released (max 0.4 secs)
```

Why no tests?
====

There _is_ a test that would have caught this. And in fact running at
the repl will catch it:

```clojure
liquibase=> (do (require 'clojure.test 'metabase.db.liquibase-test)
                (clojure.test/run-test metabase.db.liquibase-test/wait-for-all-locks-test))

Testing metabase.db.liquibase-test

ERROR in (wait-for-all-locks-test) (Formatter.java:4515)

:h2
 Will timeout if a lock is not released
expected: (= :timed-out (liquibase/wait-for-all-locks sleep-ms timeout-ms))
  actual: java.util.IllegalFormatConversionException: f != clojure.lang.Ratio
```

But this _passes_ in CI:

```
❯ clj -X:dev:test :only metabase.db.liquibase-test/wait-for-all-locks-test
Finding tests took 23.5 s.
Running 1 tests
Running before-run hooks...

Ran 1 tests in 1.461 seconds
3 assertions, 0 failures, 0 errors.
{:test 1, :pass 3, :fail 0, :error 0, :type :summary, :duration 1461.175042, :single-threaded 1}
Ran 0 tests in parallel, 1 single-threaded.
Finding and running tests took 25.0 s.
All tests passed.
Running after-run hooks...
```

And that's because the log level in testing is FATAL and this is an INFO
level log.

Discussed ways to improve this like adding a null logger during CI but
we aren't ready to increase CI times for that just yet.

Co-authored-by: dpsutton <dan@dpsutton.com>
2024-07-09 18:05:19 +00:00
github-automation-metabase
e08c1fbb40 move subtext to command palette item generation. Support model-indexes (#44638) (#45309)
* move subtext to command palette item generation. Support model-indexes

* changing text, adding unit tests

* PR Feedback

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-07-09 17:35:40 +00:00
github-automation-metabase
4e4538be83 fix flaky unit test by removing un-needed waitForElementToBeRemoved (#45291) (#45307)
Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-07-09 16:03:39 +00:00
github-automation-metabase
9f291b8233 copy change in csv modal (#45185) (#45301)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-09 15:24:07 +00:00
github-automation-metabase
73fa206eff Only drop idx_uniq_field_table_id_parent_id_name if it exists (#45246) (#45294)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-07-09 15:13:25 +00:00
github-automation-metabase
943e527f85 /api/testing/set-time: ability to set JVM time during development (#45230) (#45284)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-07-09 12:39:29 +00:00
github-automation-metabase
1142736845 Pass missing size to info icon (#45272) (#45285)
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-07-09 10:39:46 +00:00
Nemanja Glumac
b67982cd1b refactor: Tests depend on exported default polling value (#45264) (#45273)
Co-authored-by: Elton Okawa <elton.okawa@gmail.com>
2024-07-09 10:42:29 +02:00
github-automation-metabase
f608b73f13 Fix #44754: qbnewq modal can't be dismissed with keyboard (#45148) (#45233)
* Use Mantine Modal for QB Newb disclaimer

* Add repro for #44754

* Use theme spacing units

* Tweak the design slightly

* Fix E2E test

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-09 14:15:38 +07:00
github-automation-metabase
983328be4e Fix combined cards crash when cards have invalid settings (#45115) (#45257)
* fix combined cards crash when some cards have invalid viz settings

* fix mock column was not metric

* ensure combined scalar column has proper type to handle the case when the card returns empty results

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-07-09 00:33:16 +00:00
github-automation-metabase
64c1f270d1 Allow unrestricted data perms to override block even if another table has legacy no-self-service (#45118) (#45260)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-09 00:03:53 +00:00
github-automation-metabase
dd3a70520c fix stacking settings on line charts (#45197) (#45259)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-07-08 23:38:11 +00:00
github-automation-metabase
036fe9fde0 Adds plan alias info + exposes it in troubleshooting (#45051) (#45111)
Co-authored-by: bryan <bryan.maass@gmail.com>
2024-07-08 21:53:22 +00:00
github-automation-metabase
294a3c188a fix: Don't require submit buttons to have the 'filled' variant (#45247) (#45251)
This PR also specifies the 'filled' variant for the question duplication
modal, since the previous default 'filled' variant for submit button was
added to make that specific button filled.

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-07-08 21:38:37 +00:00
github-automation-metabase
bc00ae6172 🤖 backported "Don't return an archived dashboard as the most recently viewed dashboard" (#45238)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-08 17:37:23 -04:00
github-automation-metabase
9f5d6cbbe2 docs - note on info schema (#45244) (#45250)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-08 20:44:49 +00:00
github-automation-metabase
db49fd6031 🤖 backported "ci: pin replayio version" (#45211)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-08 23:42:43 +03:00
github-automation-metabase
e6c1ca7bc4 Fix Menu button in admin app on mobile view (#45058) (#45217)
* use useClickOutside, add repro test

* adjusting aria label

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-07-08 17:31:43 -03:00
github-automation-metabase
bad2dae874 Batch permission updates with many tables (#45110) (#45243)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-08 20:26:40 +00:00
github-automation-metabase
3c8a36391a Require Card ref permissions to use Card reference template tag in native query (#45000) (#45239)
* Split unrelated changes into separate PR

* Fix test since user perms set reset fix split into other PR

* Fix syntax error

* Test fixes 🔧

* Test fix??? 🔧

* Test fix 🔧

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2024-07-08 18:41:03 +00:00
github-automation-metabase
65e3847f72 Skip fingerprinting or scanning field values for fields with base-type=type/Collection (#45160) (#45189)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-07-08 17:35:30 +00:00
github-automation-metabase
ab286bc4b3 Add tables pre-fetching to dashboard load (#45107) (#45222)
* Move collect-source-tables to util

* Add table prefetching

* Add test comparing call counts of select

* Update comment

* Add exception handling

* Add nil handling

* Handle possibye empty table-ids

* Update exception handling and test case

* Update src/metabase/models/card.clj



---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-07-08 17:14:57 +00:00
github-automation-metabase
052398b939 Use filled button variant for the "Duplicate entity" modal (#45218) (#45228)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-08 15:49:47 +00:00
github-automation-metabase
b77cbd8386 add note about MySQL and MariaDB re: offset (#45219) (#45227)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-08 14:50:24 +00:00
github-automation-metabase
3c9e10b8ec add 50.10 to list of versions (#45190) (#45226)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-08 14:49:47 +00:00
github-automation-metabase
5fcc8932b6 fix: Do not collide "no results" with "running the query" (#45167) (#45213)
* Do not colide "no results" with "running the query"

Fixes #41464

* Add E2E reproduction for #41464

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-08 14:02:26 +00:00
github-automation-metabase
d04e788169 🤖 backported "lint: add stylelint support for emotion components" (#45192)
Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-08 11:55:54 +00:00
github-automation-metabase
4dd93adcb2 docs(sdk): Document how to reload Metabase embedding SDK components (#45194) (#45212)
* Document how to reload Metabase embedding SDK components

* Improve readme clarity on useEffect block

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-07-08 11:46:18 +00:00
github-automation-metabase
b16a9be4dd refactor: drop unused js file (#45183) (#45203)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-08 08:33:44 +00:00
github-automation-metabase
967a86fb7f 🤖 backported "Allow defective duplicate fields" (#45196)
Co-authored-by: Cal Herries <calherries@gmail.com>
2024-07-05 20:40:33 -06:00
github-automation-metabase
ddd66e40c1 Add INFO log for each table before JSON unfolding during field sync (#45162) (#45187)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-07-06 01:35:35 +00:00
github-automation-metabase
613d253adb Remove field refs from DatasetEditor (#45184)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-05 21:31:30 +00:00
github-automation-metabase
892f4f9194 🤖 backported "Ignore unknown columns when reverting cards and dashboards" (#45119)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-05 21:03:05 +00:00
github-automation-metabase
92cf4b8ad4 fix: param-fields when native model is aggregated (#45068) (#45150)
* fix: param-fields when native model is aggregated

Fixes #42829

The param-field lookup required result_metadata to match
filterable-columns in order to find parameter targets. This adds a
fallback where if the param field is missing from result_metadata,
then we look at filterable-columns.

* Unskip test

Co-authored-by: Case Nelson <case@metabase.com>
2024-07-05 18:01:25 +00:00
Nemanja Glumac
ed0d4515d5 🍒 Backport pivot tables reproductions (#45152)
* Repro #37380 - Users with no self-service access may update pivot tables and leave them in a non-working state (#43437)

* Fix crash and remove redundant casting

* Add repro for metabase#37380

* Be extra-safe with an empty array

* [repro] Add e2e repro for Zoom In on pivot tables row headers (#45066)

This works on master, but this reproduction will prevent #38265 from
reoccurring.

* Repro #39504: Pivot table disappears (#45143)

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-07-05 09:46:20 +02:00
Nemanja Glumac
00b65bd6f6 Fix/logs keep pooling after unmount (#44585) (#45158)
Co-authored-by: Elton Okawa <elton.okawa@gmail.com>
2024-07-05 14:30:12 +07:00
github-automation-metabase
998754072a 🤖 backported "E2E repro for "Editing Column description of Model is confusing if it contains aggregations"" (#45131)
* E2E repro for "Editing Column description of Model is confusing if it contains aggregations" (#45113)

* Fix checks and tests

* Fix checks and tests

* Fix conflict

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-04 21:02:21 +00:00
github-automation-metabase
1523aec140 Fix actions menu permission checks (#45140)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-04 20:57:24 +00:00
github-automation-metabase
144aaac10a Refine the reproduction for " Entity picker surfaces recent questions that are not valid joins" (#44974) (#45091) (#45139)
* Refine the reproduction for 44794

* Move skip to top-level again

* Remove superflouous click

* Verify wether or not the recents tab exists and is open

* Make the test description more descriptive



* Move question details to a variable

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-04 16:42:48 +00:00
github-automation-metabase
3c508e46e0 Pass correct redux action name (#44970) (#45126)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-04 11:26:38 +00:00
github-automation-metabase
49d9e46fde Reproduce #27643: Field filter linked to Boolean column causes an error when used in Embedding (#45038) (#45121)
* Add a repro for #27643

* Clarify the race condition behavior in the comment

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-07-04 06:27:08 +00:00
github-automation-metabase
1b4ce7685d 🤖 backported "User Parameter Values Are Unique Per Dashboard" (#45117)
* User Parameter Values Are Unique Per Dashboard (#45064)

* User Parameter Values Are Unique Per Dashboard

Fixes: #43001

Might be related: #44858

User Parameter Values previously stored just the `parameter-id` and `user-id` as data to look up the last used
parameter value. This isn't sufficient as the parameter id is not guaranteed to be unique, in particular this is true
when a dashboard is duplicated: the parameters are copied to the new dashboard without changing the parameter id at
all.

This means that we need to also store the dashboard-id in the user_parameter_value table and use that to update/get
the last used value.

The migration removes existing entries to the user_parameter_value table because I want a non-nullable constraint on
the dashboard_id column, and existing entries will not have a value. The only way to backfill those values would be to
look through every dashboard containing parameters, and for every parameter check for a matching ID. Even if you can
do this, there's no way to disambiguate if the same paramter exists on 2 dashboards anyway, so one of them will be
wrong. I think it's not worth the trouble considering that removing the entries in this table doesn't break anything;
it just becomes a mild inconvenience that a user has to select a filter value again (since the dashboard will use the
default value).

* alter test to check for uniqueness across dashboard

This test makes 2 dashboards with parameters of the same ID and asserts that changing the value on dashboard-a does
not change the value on dashboard-b.

* adjust migration to pass linter rules

* remove the extra rollback on migration

* Update src/metabase/models/user_parameter_value.clj

Co-authored-by: bryan <bryan.maass@gmail.com>

* Update src/metabase/models/user_parameter_value.clj

Co-authored-by: bryan <bryan.maass@gmail.com>

* adjust parameters in test so we don't get logged warnings

* put update!/insert! in a transaction to avoid any race conditions

---------

Co-authored-by: bryan <bryan.maass@gmail.com>

* change to proper migration IDs

---------

Co-authored-by: Adam James <adam.vermeer2@gmail.com>
Co-authored-by: bryan <bryan.maass@gmail.com>
2024-07-03 18:16:15 -07:00
github-automation-metabase
547398fc16 fix night theme png downloads (#44941) (#45100)
* include dark background to PNG exports when night theme is enabled

* fix css

* override border for png downloads

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-07-03 17:37:15 +00:00
github-automation-metabase
991061d2c1 🤖 backported "Only check create-queries perms when fetching DB/schema metadata" (#45098)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-07-03 15:00:08 +00:00
github-automation-metabase
a3b7b618e6 add note about permissions update (#45101) (#45102)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-03 14:56:15 +00:00
github-automation-metabase
43cc82ddf2 Auto request review workflow (#44332) (#45099)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-07-03 14:15:43 +00:00
github-automation-metabase
ce28426fd6 Support duplicate prefixes in long column names for CSV uploads (#44885) (#45092)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-07-03 14:12:09 +00:00
github-automation-metabase
6ebd09673f [MBQL lib] Allow a space in datetime literal strings (#45060) (#45096)
`Lib.diagnoseExpression` is stricter about this than the QP or FE
expression parser, making it reject expressions that tried to compare
datetimes to strings like `2024-07-02 14:34:17Z`.

Those used to work in 49.x, but a new `Lib.diagnoseExpression` call
while editing expressions caused it to regress.

Fixes #44916.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-07-03 13:52:04 +00:00
github-automation-metabase
814ad074f1 [perf] Add caching on dashboard_load_id; reusable MetadataProviders (#45050) (#45094)
**MetadataProvider cache**

The reusable MetadataProviders is a generally useful thing - within some
dynamic scope like an API request, a `clojure.core.cache` instance can
be provided as `lib.metadata.jvm/*metadata-provider-cache*`, and that
will be used to cache the provider for each `database-id`.

Reusing those providers can significantly reduce appdb traffic,
re-fetching the same metadata in different `MetadataProvider`
instances.

**Dashboard loads**

The FE can supply `?dashboard_load_id=uuid_string` on requests for a
dashboard load:

- `/api/dashboard/:id`
- `/api/dashboard/:id/query_metadata`
- `/api/dashboard/:id/dashcard/:dashcard_id/card/:card_id/query`

That provides a good cache key across that burst of N+2 API requests
that are part of a single load. Currently it is used for two things:

- Caching `get-dashboard` (used by the first two requests)
- Selecting the `clojure.core.cache` for `*metadata-provider-cache*`

Both use a TTL of 10 seconds, which is generally enough for the first
screenful of a dashboard load, if not the whole thing. (Browsers will
only issue a handful of requests at once, so a few long-running queries
might delay later parts of the dashboard from loading until after the
TTL expires.)

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-07-03 13:51:02 +00:00
github-automation-metabase
7326c66201 Add repro for #43216 (#44972) (#45080)
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-03 12:05:23 +00:00
github-automation-metabase
62dfac9d3a Add repro for extra case related to metabase#42385 (#45083) (#45088)
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-03 11:54:40 +00:00
github-automation-metabase
89be1603a8 Add reproduction for #44974 (#44978) (#45087)
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-07-03 11:47:27 +00:00
github-automation-metabase
02635131f2 🍒 Fix #35954: SQL-converted question with field filter breaks filtered dashboard if reverted back to its editor version (#44987) (#45065)
* Make sure the query is native

* Convert the comment to JSDoc

* Add E2E reproduction

* Fix mapping

* Add test scenarios for the public sharing and embedding

* Simplify API payload

* Extract and significantly expand the reproduction scope

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-03 09:18:39 +02:00
github-automation-metabase
3aa4d016ae Test for #40775 (#45072) (#45075)
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2024-07-02 23:06:23 +00:00
github-automation-metabase
ae4707a5c0 Add e2e tests for basic field remapping logic (#45055) (#45071)
* Add e2e tests for basic field remapping logic

* await for PUT

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-02 22:06:22 +00:00
github-automation-metabase
21e3019709 Performance: partial data-permissions graph refactor (#44795) (#45056)
* only send permissions updates for groups that have been modified in the graph

* Support partial permission graph updates on the BE (#44797)

* handles keeping track of advanced permissions changes to send relevant group data when updating the graph, merges response

* tests and optimizations

* respect group-ids set when fetching connection impersonations, sandboxes, and admin group perms

* fix typo

* add e2e test

* fix BE test

* impls pr feedback, reduces code needed since advanced permissions state is always reset on save

* last fixes

---------

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2024-07-02 17:57:32 +00:00
github-automation-metabase
3f8df85ddc docs - oracle note (#44543) (#45057)
* clarify driver vs database reqs

* note

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-02 17:21:54 +00:00
github-automation-metabase
e51dd4ee3d docs: warnings about question marks (#44920) (#45049)
* question marks

* remove all question mark notes except about json

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-07-02 16:08:12 +00:00
github-automation-metabase
de018ca1a8 Repro parameter field matching issues for questions based on sql models (#44942) (#45040)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-02 14:36:49 +00:00
github-automation-metabase
8b129ae0f9 Fix - Invalid join clause does not disappear after changing query source to use a different database (#45025) (#45043)
* Reset JoinDraft state on database change (fixes metabase#42385)

* Add repro for #42385

* Use admin user

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-02 14:35:04 +00:00
github-automation-metabase
70dd51deb2 🤖 backported "Add a repro for 'Permission error before finishing referencing a question in the native query'" (#45010)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-07-02 16:25:16 +03:00
github-automation-metabase
ec9f5524b3 add 50.9 to list of releases (#45033) (#45035)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-07-02 12:48:43 +00:00
github-automation-metabase
720e549ea3 Repro #34350 - Unable to switch question to query table in another database (#44969) (#45012)
* Add repro for #34350

* Reduce diff

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-02 08:19:32 +00:00
github-automation-metabase
9a2260fccf Return info about the proper billing status on the license page (#44855) (#45004)
* return data about the proper billing status

* fix copy

* fix the tests

Co-authored-by: bryan <bryan.maass@gmail.com>
2024-07-01 23:48:29 +00:00
github-automation-metabase
bbc7250634 Better display names for CSV upload tables (#44862) (#44996)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-07-01 21:26:51 +00:00
Jeff Bruemmer
8346bb0f32 update API docs (#44935) 2024-07-01 20:26:10 +00:00
github-automation-metabase
ee8b4934fd 🤖 backported "support sorting on funnel bar charts" (#44993)
* support sorting on funnel bar charts (#44943)

* support sorting on funnel bar charts

* fix funnel bar row display setting

* spec

* Update Loki Snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-07-01 20:19:46 +00:00
github-automation-metabase
259f9cd84f Memoize driver.u/supports? only in prod (#44938) (#44981)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-07-01 20:13:38 +00:00
github-automation-metabase
9d1d94cd9c Adds a property to a defsetting (#44990) (#44991)
* mark a defsetting as being :sensitive?

* add test

Co-authored-by: bryan <bryan.maass@gmail.com>
2024-07-01 19:03:55 +00:00
github-automation-metabase
e103952680 Support specific date filters with 00:00 time (#44979)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-07-01 17:46:13 +00:00
github-automation-metabase
b6fe1b621b Add reproduction for "Accurate Error Messaging for Cross DB Joins in Notebook Editor" (#44975) (#44985)
* Add reproduction for #38989

* Use saveQuestion instead of clicking trough the UI



* Use openOrdersTable instead of manually clicking through the ui



* Create question programmatically in test

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-01 15:32:57 +00:00
Nemanja Glumac
4ba83c60c5 Consolidate admin E2E reproductions for the release-x.50.x (#44963)
* Combine and reorganize admin e2e specs (#43853)

* combine and reorganize admin specs

* fix import and reorganize more

* Revert React 18 changes

* Revert Metrics v2 changes

* Bring back #44497

* Add a reproduction for "Cannot find the new column in pick columns after alter schema and synced" (#44882)

* Add a reproduction for metabase#41765

* Navigate manually to the admin page

* Regroup (metric v1) repro for 36422

* fix: Remove help email from error diagnostic modal (#44165)

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-07-01 16:20:04 +02:00
github-automation-metabase
704ad87f81 Repro #27521 - Query fails when selecting two fields from nested query, when fields are identical except for their join-alias (#44909) (#44968)
* Add repro for #27521

* Improve assertions

* Add comments

* Use saveQuestion helper

* Use openOrdersTable helper

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-01 13:34:18 +00:00
github-automation-metabase
6016c36a1c Repro #28106 - Scrolling up on schema list jumps to the top when creating a new question (#44965) (#44971)
* Add a test table with many schemas

* Add a repro for #28106

* Format code

* Add issue tag

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-01 13:17:16 +00:00
github-automation-metabase
3265f7c34b Combine actions e2e specs (#43846) (#44964)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-07-01 11:32:00 +00:00
github-automation-metabase
aea7d7b06a fix: one of transactions was removed and that causes problems on downgrade (#44908) (#44953)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-07-01 13:40:50 +03:00
github-automation-metabase
27d535a0a8 Fix unable to rollback due to dropped not null constraint on 50 (#44886) (#44954)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-07-01 08:17:41 +00:00
metabase-bot[bot]
056d91ce09 Fix breakout pivot tether (#43060) (#44903)
* Limit the height of the breakout popover

* Allow the click action popover to untether to prevent overflowing the screen

* Add reproduction for #43075

* Rename breaktrhough to breakout



* Use findAllByTestId



* Remove copy pasted question name



* Remove unused api intercept



---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-07-01 07:41:47 +00:00
github-automation-metabase
99393cbb7e Wrap non-latin characters in a span specifying working font (#44580) (#44944)
* Wrap non-latin characters in a span specifying working font

Fixes: #38753

CSSBox seems to have a bug where font fallback doesn't work properly. This is noticeable when a font does not contain
glyphs that are present in the string being rendered. For example, Lato does not have many international characters,
so the rendered version of tables (that show up in Slack messages) will not render properly, making the card
unreadable.

Since this appears to be a downstream bug, I've opted to work around this limitation by wrapping any non-latin
characters in a <span> that specifies the font family to be sans-serif, which should contain the glyphs to properly
render.

This leaves Lato in place for other characters.

For now, I figured it's worth trying this solution over using Noto for 2 reasons:
- we can keep Lato, which has been the decided font style for the app for some time (this keeps things consistent
where possible)
- the Noto font containing all glyphs is quite a large font (>20mb, I think) and it would be nice to avoid bundling
that if we can.

* stub installed fonts test

* typo

* Do wrapping, but now per-string, and in Clojure data not html string

I've decided that a reasonable solution is to still wrap strings containing non-lato characters. But it's not done
with str/replace to the html string but rather in a postwalk over the Hiccup data prior to rendering.

Seems like a decent compromise of issues without patching CSSBox or fixing upstream (may be good to do, but will take
longer to get a fix in).

* add test checking that glyphs render correctly

* Add a test that directly checks the wrapping fn

* Change the string to keep the linter quiet

* Change how we check if string can be rendered to faster method, new Lato Font

With Sanya's help, the way I check if a given string is renderable with Lato is now faster.

Also use the full Lato font, not just the 'latin' lato so we can cover more chars

* change lato so that it loads the fn even in a fresh test run

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-07-01 07:31:55 +00:00
github-automation-metabase
3b13fd33ba 🤖 backported " Be explicit about truncating characters versus bytes" (#44919)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-06-30 23:18:09 +02:00
github-automation-metabase
18f82bee5c improve cartesian charts performance (#44861) (#44939)
* improve cartesian charts performance

* drop unused import

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-06-29 01:37:35 +00:00
github-automation-metabase
962a515e31 Add a repro for 'Filter values in dropdown are not getting populated in SQL question based dashboard' (#44927) (#44936)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-06-28 22:00:02 +00:00
github-automation-metabase
47c8be9363 Fix pin maps unnecessarily filtering out null values (#44853) (#44934)
* prevent pin maps from filtering out rows with null values

- since pin maps are just displaying where the data is by latitude and longitude, we do not need to filter the pin just because one of the rows is null.
- the metric column selection does not make sense for pins as they just represent that data through coordinates (no aggregations or values displayed), so we should not be filtering out any data just because it is null

* add unit test

Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-06-28 21:29:03 +00:00
github-automation-metabase
64652afa70 ClickHouse note (#44929) (#44932)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-28 20:53:56 +00:00
github-automation-metabase
ccca637310 docs: add 50.8 (#44925) (#44933)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-06-28 20:51:43 +00:00
github-automation-metabase
dc9e68bc8e Rather support old files, than duplicate columns (#44873) (#44914)
* Rather support old files, than duplicate columns

* Cope with driver specific failure modes

* Restore bytes comment

Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-06-28 16:52:49 +00:00
Nemanja Glumac
d9393b4cd7 Consolidate native filter E2E reproductions for the release-x.50.x branch (#44891)
* consolidate e2e native filter specs

* fix helper

* fix runQuery call

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-28 16:12:28 +02:00
github-automation-metabase
84a3f626e8 Ensure we close the canceled chan in query processor after query (#44860) (#44864)
Customer complaints that thread growth was unbounded. Investigated and
found bigquery involved and isolated to the cancel thread bits. Gist is
this:

```clojure
      (when cancel-chan
        (future                       ; this needs to run in a separate thread, because the <!! operation blocks forever
          (when (a/<!! cancel-chan)
            (log/debug "Received a message on the cancel channel; attempting to stop the BigQuery query execution")
            (reset! cancel-requested? true) ; signal the page iteration fn to stop
            (if-not (or (future-cancelled? res-fut) (future-done? res-fut))
              ;; somehow, even the FIRST page hasn't come back yet (i.e. the .query call above), so cancel the future to
              ;; interrupt the thread waiting on that response to come back
              ;; unfortunately, with this particular overload of .query, we have no access to (nor the ability to control)
              ;; the jobId, so we have no way to use the BigQuery client to cancel any job that might be running
              (future-cancel res-fut)
              (when (future-done? res-fut) ; canceled received after it was finished; may as well return it
                @res-fut)))))
```

The important parts is that we closeover the cancel-chan and start a
thread that is trying to pull from it. If we never put anything on that
channel or never close that channel this thread will just remain blocked
waiting.

In a thread dump, that looks like the following:
(note, I've made it set the thread names to make it easy to follow run a
query 30 times)

```
Full thread dump OpenJDK 64-Bit Server VM (21.0.2+13-LTS mixed mode):
...

"bigquery-cancel-thread" #73 [95747] prio=5 os_prio=31 cpu=2.76ms elapsed=208.53s tid=0x000000029e00f600 nid=95747 waiting on condition  [0x00000002c1266000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #108 [93211] prio=5 os_prio=31 cpu=154.60ms elapsed=128.72s tid=0x000000029f0dc200 nid=93211 waiting on condition  [0x000000029fa06000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #116 [116527] prio=5 os_prio=31 cpu=0.16ms elapsed=61.14s tid=0x00000002c1917c00 nid=116527 waiting on condition  [0x000000029fc12000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #118 [98315] prio=5 os_prio=31 cpu=161.69ms elapsed=60.27s tid=0x00000002b91cca00 nid=98315 waiting on condition  [0x000000029fe1e000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #119 [121607] prio=5 os_prio=31 cpu=0.13ms elapsed=59.35s tid=0x00000002b9236400 nid=121607 waiting on condition  [0x00000002a002a000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #120 [99079] prio=5 os_prio=31 cpu=0.13ms elapsed=58.55s tid=0x000000029e295600 nid=99079 waiting on condition  [0x00000002a0506000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #121 [122375] prio=5 os_prio=31 cpu=0.10ms elapsed=57.75s tid=0x00000002b921f400 nid=122375 waiting on condition  [0x00000002c0e4e000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #122 [123655] prio=5 os_prio=31 cpu=0.18ms elapsed=56.97s tid=0x0000000134bfa000 nid=123655 waiting on condition  [0x00000002c105a000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #123 [122631] prio=5 os_prio=31 cpu=0.11ms elapsed=56.28s tid=0x000000013569be00 nid=122631 waiting on condition  [0x00000002c1472000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #124 [96007] prio=5 os_prio=31 cpu=0.10ms elapsed=55.42s tid=0x0000000133b54e00 nid=96007 waiting on condition  [0x00000002c167e000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #125 [97799] prio=5 os_prio=31 cpu=0.09ms elapsed=54.73s tid=0x0000000131c19a00 nid=97799 waiting on condition  [0x00000002c2206000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #126 [96519] prio=5 os_prio=31 cpu=0.10ms elapsed=53.97s tid=0x000000012370f600 nid=96519 waiting on condition  [0x00000002c2412000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #127 [124167] prio=5 os_prio=31 cpu=0.10ms elapsed=53.33s tid=0x0000000134312200 nid=124167 waiting on condition  [0x00000002c28ea000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #128 [97287] prio=5 os_prio=31 cpu=0.12ms elapsed=52.57s tid=0x00000001233ae000 nid=97287 waiting on condition  [0x00000002c4706000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #129 [104715] prio=5 os_prio=31 cpu=0.10ms elapsed=51.83s tid=0x0000000131e47a00 nid=104715 waiting on condition  [0x00000002c4912000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #130 [102919] prio=5 os_prio=31 cpu=0.08ms elapsed=51.10s tid=0x0000000123540200 nid=102919 waiting on condition  [0x00000002c4b1e000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #131 [117263] prio=5 os_prio=31 cpu=0.17ms elapsed=50.37s tid=0x00000001233d1200 nid=117263 waiting on condition  [0x00000002c4d2a000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #132 [114951] prio=5 os_prio=31 cpu=0.09ms elapsed=49.71s tid=0x000000013484dc00 nid=114951 waiting on condition  [0x00000002c4f36000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #133 [103687] prio=5 os_prio=31 cpu=0.14ms elapsed=49.08s tid=0x0000000123517200 nid=103687 waiting on condition  [0x00000002c5142000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #134 [91419] prio=5 os_prio=31 cpu=0.08ms elapsed=48.38s tid=0x0000000131b43600 nid=91419 waiting on condition  [0x00000002c534e000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #135 [127495] prio=5 os_prio=31 cpu=0.14ms elapsed=47.66s tid=0x0000000131ce7000 nid=127495 waiting on condition  [0x00000002c555a000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #139 [103955] daemon prio=5 os_prio=31 cpu=0.12ms elapsed=23.22s tid=0x0000000121aaca00 nid=103955 waiting on condition  [0x00000002c5766000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #140 [105219] daemon prio=5 os_prio=31 cpu=0.10ms elapsed=22.54s tid=0x0000000133f47600 nid=105219 waiting on condition  [0x00000002c5972000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #141 [105731] daemon prio=5 os_prio=31 cpu=0.15ms elapsed=21.69s tid=0x00000001353ba800 nid=105731 waiting on condition  [0x00000002c5b7e000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #142 [114435] daemon prio=5 os_prio=31 cpu=0.08ms elapsed=20.89s tid=0x0000000131e76400 nid=114435 waiting on condition  [0x00000002c5d8a000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #143 [106499] daemon prio=5 os_prio=31 cpu=0.10ms elapsed=20.12s tid=0x0000000123107e00 nid=106499 waiting on condition  [0x00000002c5f96000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #144 [113923] daemon prio=5 os_prio=31 cpu=0.11ms elapsed=19.52s tid=0x00000002c1918400 nid=113923 waiting on condition  [0x00000002c61a2000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #145 [107011] daemon prio=5 os_prio=31 cpu=0.13ms elapsed=18.93s tid=0x00000002a6ad3e00 nid=107011 waiting on condition  [0x00000002c63ae000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #146 [113667] daemon prio=5 os_prio=31 cpu=0.12ms elapsed=18.37s tid=0x00000001341a2800 nid=113667 waiting on condition  [0x00000002c65ba000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #147 [113155] daemon prio=5 os_prio=31 cpu=0.16ms elapsed=17.74s tid=0x000000013445da00 nid=113155 waiting on condition  [0x00000002c67c6000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #148 [107779] daemon prio=5 os_prio=31 cpu=0.13ms elapsed=17.19s tid=0x0000000134704e00 nid=107779 waiting on condition  [0x00000002c69d2000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #149 [112643] daemon prio=5 os_prio=31 cpu=0.17ms elapsed=16.54s tid=0x000000011f185000 nid=112643 waiting on condition  [0x00000002c6bde000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #150 [108035] daemon prio=5 os_prio=31 cpu=0.24ms elapsed=15.95s tid=0x000000011f1be200 nid=108035 waiting on condition  [0x00000002c6dea000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #151 [108547] daemon prio=5 os_prio=31 cpu=0.11ms elapsed=15.38s tid=0x00000001302cf800 nid=108547 waiting on condition  [0x00000002c6ff6000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #152 [109059] daemon prio=5 os_prio=31 cpu=0.24ms elapsed=14.85s tid=0x0000000133c4be00 nid=109059 waiting on condition  [0x00000002c7202000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #153 [109315] daemon prio=5 os_prio=31 cpu=0.10ms elapsed=14.15s tid=0x00000001339dc000 nid=109315 waiting on condition  [0x00000002c740e000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #154 [109571] daemon prio=5 os_prio=31 cpu=0.17ms elapsed=13.57s tid=0x0000000134ea3600 nid=109571 waiting on condition  [0x00000002c761a000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #155 [110083] daemon prio=5 os_prio=31 cpu=0.20ms elapsed=12.95s tid=0x0000000121d7aa00 nid=110083 waiting on condition  [0x00000002c7826000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #156 [110339] daemon prio=5 os_prio=31 cpu=0.12ms elapsed=12.35s tid=0x0000000134ff5c00 nid=110339 waiting on condition  [0x00000002c7a32000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #157 [110595] daemon prio=5 os_prio=31 cpu=0.09ms elapsed=11.65s tid=0x0000000133e27000 nid=110595 waiting on condition  [0x00000002c7c3e000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #158 [111107] daemon prio=5 os_prio=31 cpu=0.13ms elapsed=11.04s tid=0x0000000131e8b800 nid=111107 waiting on condition  [0x00000002c7e4a000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #159 [174339] daemon prio=5 os_prio=31 cpu=0.13ms elapsed=10.51s tid=0x0000000134ff6400 nid=174339 waiting on condition  [0x00000002c8056000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #160 [173827] daemon prio=5 os_prio=31 cpu=0.12ms elapsed=9.79s tid=0x0000000133ff7c00 nid=173827 waiting on condition  [0x00000002c8262000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #161 [173315] daemon prio=5 os_prio=31 cpu=0.11ms elapsed=9.18s tid=0x0000000122c9b600 nid=173315 waiting on condition  [0x00000002c846e000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #162 [131331] daemon prio=5 os_prio=31 cpu=0.12ms elapsed=8.58s tid=0x0000000133b9c400 nid=131331 waiting on condition  [0x00000002c867a000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #163 [172547] daemon prio=5 os_prio=31 cpu=0.14ms elapsed=8.06s tid=0x0000000134d4cc00 nid=172547 waiting on condition  [0x00000002c8886000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #164 [131587] daemon prio=5 os_prio=31 cpu=0.15ms elapsed=7.35s tid=0x000000029e17f800 nid=131587 waiting on condition  [0x00000002c8a92000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #165 [131843] daemon prio=5 os_prio=31 cpu=0.16ms elapsed=6.71s tid=0x00000002b9513a00 nid=131843 waiting on condition  [0x00000002c8c9e000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #166 [132355] daemon prio=5 os_prio=31 cpu=0.10ms elapsed=6.12s tid=0x0000000122dede00 nid=132355 waiting on condition  [0x00000002c8eaa000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)
--
"bigquery-cancel-thread" #167 [132867] daemon prio=5 os_prio=31 cpu=0.11ms elapsed=5.54s tid=0x00000001233b1000 nid=132867 waiting on condition  [0x00000002c90b6000]
   java.lang.Thread.State: WAITING (parking)
	at jdk.internal.misc.Unsafe.park(java.base@21.0.2/Native Method)

```

Simple repro:

```clojure
bigquery-profile=> (require '[clojure.core.async :as a])
nil
bigquery-profile=> (let [c (a/chan)
                         t (Thread. (fn []
                                      (when (a/<!! c)
                                        (println "got something")))
                                    "Forever-running")]
                     (.start t)
                     (a/close! c)
                     (Thread/sleep 4000)
                     (let [thread-names (into #{} (map ^[] Thread/.getName) (.keySet (Thread/getAllStackTraces)))]
                       (contains? thread-names "Forever-running")))
false
bigquery-profile=> (let [c (a/chan)
                         t (Thread. (fn []
                                      (when (a/<!! c)
                                        (println "got something")))
                                    "Forever-running")]
                     (.start t)
                     #_(a/close! c) ;; if we don't close it will never stop running
                     (Thread/sleep 4000)
                     (let [thread-names (into #{} (map ^[] Thread/.getName) (.keySet (Thread/getAllStackTraces)))]
                       (contains? thread-names "Forever-running")))
true
```

So this PR just adds a transducer around the rf that closes the
`cancel-chan` if it's open. Note that multiple closes are fine: from the
docstring: "Closing a closed channel is a no-op".

Co-authored-by: dpsutton <dan@dpsutton.com>
2024-06-28 14:11:52 +00:00
github-automation-metabase
fbdc3e87ca Fix changing viz type for nodata users (#44907)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-28 14:04:08 +00:00
github-automation-metabase
d6338d5973 Add repro for "Join UI picks the first schema even if a different one is selected" (#44904)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-28 09:33:54 -04:00
github-automation-metabase
334ab61b7f Add repro for API allows count(field) which kills the metrics page (#44836) (#44905)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-28 13:28:48 +00:00
github-automation-metabase
7f335c6d90 Add repro for Dashboard click through behavior to a question does not pass time filters correctly (#44833) (#44906)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-28 13:24:18 +00:00
Nemanja Glumac
4ba5fa2afd Consolidate tabular viz E2E reproductions for the release-x.50.x branch (#44895)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-28 13:23:06 +00:00
Nemanja Glumac
f7fc62a256 Consolidate permissions E2E reproductions for the release-x.50.x branch (#44900)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-28 12:54:17 +00:00
Nemanja Glumac
07313ba9bb Consolidate chart viz E2E reproductions for the release-x.50.x branch (#44899)
* Consolidate chart viz e2e specs (#43619)

* Fix invalid API request fired on chart legend click (#44579)

* remove invalid else conditional

* fix RowChart firing invalid API request on legend item click

* fix clicking on non-breakout legend on dashboards

* add E2E test to validate and enforce the desired behavior

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-06-28 14:40:03 +02:00
Nemanja Glumac
2600478918 Consolidate native E2E reproductions for the release-x.50.x branch (#44901)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-28 14:39:26 +02:00
github-automation-metabase
6863f98fe3 🤖 backported "Repro #33427 - Question editor does not work if model joins the same table more than once" (#44896)
* Repro #33427 - Question editor does not work if model joins the same table more than once (#44884)

* Add repro for #33427

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

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

---------

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

* Adjust the test for v50

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-28 12:26:45 +00:00
Nemanja Glumac
826f8d8385 Consolidate embedding E2E reproductions for the release-x.50.x branch (#43843) (#44892)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-28 13:29:31 +02:00
Nemanja Glumac
9cc3993826 Consolidate search E2E reproductions for the release-x.50.x branch (#44893)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-28 12:43:44 +02:00
Nemanja Glumac
b068eb8c59 Consolidate dashboard E2E reproductions for the release-x.50.x branch (#44883)
* consolidate dashboard e2e specs

* fix import

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-28 11:28:15 +02:00
Nemanja Glumac
9afc088e99 Consolidate dashboard cards E2E reproductions for the release-x.50.x branch (#44880) 2024-06-28 12:24:24 +03:00
Nemanja Glumac
190eee8007 Consolidate joins E2E reproductions for the release-x.50.x branch (#44878)
* Port the original joins repro consolidation

* Add e2e repro (#44656)

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-28 12:24:17 +03:00
Nemanja Glumac
78c06ded48 Consolidate custom column E2E reproductions for the release-x.50.x branch (#44871)
* Port the original CC repro consolidation

* Consolidate cc shortcuts

* Consolidate smaller CC files
2024-06-28 12:24:08 +03:00
github-automation-metabase
95f6f5390b Repro #40635 - Metabase model does not display information correctly (#44824) (#44877)
* Add repro for #40635

* Comment out failing assertions

* Skip repro

* Improve test name

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-06-28 08:47:36 +00:00
github-automation-metabase
9cc6a069e3 Repro #34955: Custom column of type datetime with dashboard filter (#44838) (#44879)
* Add repro for #34955

* Add a comment

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-28 08:45:55 +00:00
github-automation-metabase
b6d97db5e3 Patch storybook to fix failed loki tests with runtime error (#44875) (#44881)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-06-28 08:24:13 +00:00
Nemanja Glumac
7e9f696c31 Consolidate sharing E2E reproductions for the release-x.50.x branch (#44870)
* Port sharing download reproductions

* Port sharing reproductions

* Consolidate approved-domains
2024-06-28 09:21:11 +01:00
Nemanja Glumac
1fb82d22bb Consolidate collections E2E reproductions for the release-x.50.x branch (#44867)
* Port original collections consolidation

* Port collection-item-listing
2024-06-28 07:16:47 +00:00
github-automation-metabase
078c7dda12 Add a repro for 'Page hangs when one of parameters contains {{x}} value' (#44852) (#44865)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-06-28 04:28:27 +00:00
github-automation-metabase
a5de7f6790 🤖 backported "Single Log Out saml-slo-enabled defsetting" (#44845)
* Single Log Out saml-slo-enabled defsetting (#44794)

- backport:
  - use `client/client-real-response`, instead of `client-full-response`

* stop using strings for enum values (prefer kw)

* only do SLO when saml-slo-enabled is true

* make defsetting docstring formatting consistent

* log-direction is a string

* add test for enabling / disabling saml slo

- also return a 403 when the client tries, but it's disabled

* use client-full-response, which won't add '/api'.

* fix typo in deftest name

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
2024-06-27 23:30:39 +00:00
github-automation-metabase
7178e12f69 Error on import into an empty appdb (#44840) (#44849)
I was thinking about the potential options here.

On one hand, we could initialize the app db ourselves. This is a little
problematic, because:

- our `init!` function is in `metabase.core` and calling it yields a
painful cyclical dependency. It's also pretty tied to outputting things
to the user that they might not expect during an import, e.g. "Looks
like this is a new installation ... preparing setup wizard", and starts
up jobs, etc.

- if we choose to *only* initialize the database ourselves (only the
bits that we actually *need* initialized), I'm a little nervous about
maybe missing something. Right now we need to create the internal user
and create users from the config file before running the import. If we
added a third thing, would we remember to update this?

- we could refactor to put all of the above in one spot, but this is a
P1 and it feels important to close this out as quickly as possible. We
also don't claim to support initializing the app DB from an import in
the first place.

So: just throw an exception if the app db hasn't been set up yet. Our
heuristic here is whether a single non-internal user has been created.
So if you want to use your config, you can run:

```
MB_CONFIG_FILE_PATH=dev/config.yml java -jar metabase.jar
java -jar metabase.jar import /my/exported/dump
```

If you try to run `java -jar metabase.jar import ...` on a fresh
DB, it'll now fail with the error message:

```
You cannot `import` into an empty database. Please set up Metabase
normally, then retry.
```

Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-06-27 20:41:53 +00:00
github-automation-metabase
666bf8eb09 [Mongo] Convert bson Decimal128 negative zero to BigInteger zero (#44611) (#44834)
* Convert bson Decimal128 negative zero to BigInteger zero

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-06-27 18:32:58 +00:00
github-automation-metabase
c4909275b2 docs: clarify migrate down instructions (#44843) (#44844)
* docs: clarify migrate down for docker

* add jar instructions

* wording

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-06-27 18:15:32 +00:00
github-automation-metabase
fd5e13d132 Unskip repro for #14957: Saving a question before query has been executed can be slow with UI "hanging" (#44825) (#44839)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-27 17:55:15 +00:00
github-automation-metabase
6c793946a8 Fix order by field refs (#44740) (#44835)
* Fix order by field refs

* Update test to handle all drivers

* Untangle fix-order-by-field-refs

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-06-27 16:24:35 +00:00
github-automation-metabase
1db1901e02 Parse not a number passed to id filter (#44826) (#44832)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-06-27 16:01:25 +00:00
github-automation-metabase
82e95f8c4f Coerce the default parameter value when the parameter is no longer multi-select (#44816)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-27 15:39:16 +00:00
github-automation-metabase
b175b7d725 🤖 backported "Split SummarizeContent from SummarizeSidebar" (#44732)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-06-27 18:35:08 +03:00
github-automation-metabase
19dd1981e4 Reproduction for "When List style field is changed to show remapped foreign key, then cached values are not updated" (#44806) (#44831)
* Add a reproduction for metabase#15542

* Add comment on force: true usage in sidebar

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-06-27 15:32:44 +00:00
github-automation-metabase
a4f7538250 Fix n+1 query in sandboxing enforcement (#44793) (#44827)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-06-27 15:08:00 +00:00
github-automation-metabase
a9f08a606e add e2e test for public dashboard title (#44822) (#44828)
* refactor: move prepareDashboard to a separate function

* test: page title on public dashboard

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-06-27 15:01:34 +00:00
Nemanja Glumac
703708d15a Consolidate models JS reproductions for the release-x.50.x branch (#44823)
* Port the original JS repros consolidation from master

* Port the OSS fix from master
https://github.com/metabase/metabase/pull/43660

* Fix 23024

Port changes from https://github.com/metabase/metabase/pull/44372

* Fix model metadata editing for SQL models with manually sorted columns (#44574)

* Repro #33330: Cumulative count breaks in certain situations (#44671)

* Revert the changes from #42339

* Fix another "trash" reference

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-27 11:00:46 -04:00
github-automation-metabase
3dfdc260dd Fix numeric parameter parsing (#44792) (#44820)
* Fix numeric parameter parsing

* Update frontend/src/metabase-lib/v1/parameters/utils/parameter-parsing.unit.spec.js



* Update frontend/src/metabase-lib/v1/parameters/utils/parameter-parsing.unit.spec.js



---------

Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-27 10:49:58 -04:00
Nemanja Glumac
5015a8cd3d Consolidate models TS reproductions for the release-x.50.x branch (#44818)
* Port TS reproductions

* Revert React 18 changes from master

* Incorporate 41785

* Fix typo [ci skip]
2024-06-27 15:50:07 +02:00
github-automation-metabase
099cee80c3 E2E repro for Adding filter of summarized field grouped by latitude and longitude on a map breaks breadcrumbs (#44787) (#44819)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-27 13:46:06 +00:00
github-automation-metabase
65eaf26139 E2E repro for Metrics fields disapearing when joinning question (#44785) (#44821)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-27 13:27:15 +00:00
github-automation-metabase
874dfce2c9 🤖 backported "Repro #41785 - Using Column picker to remove columns on model breaks question with ERROR: column source.name_2 does not exist Position" (#44815)
* Repro #41785 - Using Column picker to remove columns on model breaks question with ERROR: column source.name_2 does not exist Position (#44808)

* Add repro for #41785

* Update comment

* Fix failing test

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-06-27 13:11:34 +00:00
Nemanja Glumac
7779d9ac8a Fix graph.metrics sync after adding a new query stage (#44697) (#44812)
* Add repro

* Accept non-aggregation cols in graph metrics sync

* Address feedback

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-06-27 12:21:18 +00:00
github-automation-metabase
8717af1e9b fix: dont always optimize between expressions (#44493) (#44642)
* fix: dont always optimize between expressions

Fixes #42291

The frontend produces expressions like

```
[:between
 [+ [:field ... {:temporal-bucket :day] [:interval 2 :day]]
 [:relative-datetime -1 :week]
 [:relative-datetime 0 :week]]
```

This should not be optimized because of the mixed `:day` and `:week`
units. However, it was being optimized since the compatible units
weren't being properly picked up by the match.

* Disable suspcicios args eastwood lint, kondo does it better

* Stop autobucket to day when adding a time interval

Co-authored-by: Case Nelson <case@metabase.com>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-27 11:38:01 +00:00
Nemanja Glumac
511b40cecb Fix FE crash for line/area/bar charts with no data (#44769) (#44803)
* Add test

* Fix `xDomain` calculation in QB selectors

* Make database `features` optional

* Update reproductions-3.cy.spec.js



---------

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-06-27 11:27:09 +00:00
github-automation-metabase
7ee7662fd7 🤖 backported "Opt out of non-reserved SQL keywords" (#44744)
Co-authored-by: Chris Truter <chris@metabase.com>
2024-06-27 11:38:28 +01:00
Nemanja Glumac
53e4ac151f Consolidate question reproductions 3 (#44801)
* Port the original `reproductions-3.cy.spec.js`

* Port changes from #44053

* E2E repro for "Fix issue with root collection in QuestionPicker" (#44318)

* Port 44415 and 44532

* Port 41381

* Add reproduction for "Result inconsistencies with Preview in GUI editor #40399" (#44630)

* Add e2e test to verify that step previews only care about the step being previewed

* Use getNotebookStep and find preview button using cy.icon

* Remove empty line

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

---------

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

* Fix expressions with the same name as their base column (#44641)

* Pass expressionPosition

* Add a test

* Update e2e/test/scenarios/question-reproductions/reproductions-3.cy.spec.js

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

* Rename expressionPosition to expressionIndex

---------

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

* Add E2E repro for convertTimezone (#44705)

* E2E test for custom date expression error (#44694)

* Add reproduction for "Closing Drop-down in Join column selector causes non-drop-down columns to disappear" (#44675)

* Add reproduction for #19894

* Use startNewQuestion

* Fix 43294

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-06-27 12:08:57 +02:00
github-automation-metabase
4e27a4f454 Memoize driver.u/supports? (#44719) (#44804)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-06-27 09:05:18 +00:00
Nemanja Glumac
6ccb117083 Consolidate question E2E reproductions (1 and 2) for the release-x.50.x branch specifically (#44799)
* Add new e2e test group

* Consolidate `reproductions-1.cy.spec.js`

* Revert changes specific to `master`

* Port the original `reproductions-2.cy.spec.js`

* Port a change from #43481

* Port changes from #43660

* Add a repro for 'Cannot change question data source to raw data after selecting saved question' (#44757)

* Add a repro for 'Cannot change question data source to raw data after selecting saved question'

* Update e2e/test/scenarios/question-reproductions/reproductions-2.cy.spec.js

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

* Update e2e/test/scenarios/question-reproductions/reproductions-2.cy.spec.js

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

* Update e2e/test/scenarios/question-reproductions/reproductions-2.cy.spec.js

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

---------

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

* Add a repro for 'Visible Columns errors when source query is a table joined on itself' (#44737)

* Add a repro for 'Visible Columns errors when source query is a table joined on itself'

* verify warning icon is not rendered

* Fix repro 9027

Revert "move to trash" changes

---------

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-06-27 09:41:06 +02:00
github-automation-metabase
96e3b7b3b9 Fix invalid API request fired on chart legend click (#44579) (#44762)
* remove invalid else conditional

* fix RowChart firing invalid API request on legend item click

* fix clicking on non-breakout legend on dashboards

* add E2E test to validate and enforce the desired behavior

Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-06-26 16:01:54 -04:00
github-automation-metabase
6e5ba34384 🤖 backported "fix pivot table horizontal scrollbar not appearing" (#44718)
* fix pivot table horizontal scrollbar not appearing (#44514)

* fix pivot horizontal scroll

* fix scroll on dashboard

* add e2e test

* fix unit tests

* fix e2e test

* delete pivot table stories

* remove loki changes

---------

Co-authored-by: Emmad Usmani <emmadusmani@berkeley.edu>
2024-06-26 18:51:25 +00:00
github-automation-metabase
e55ccd9b8e Skip unecessary quartz job deletion migration (#44652) (#44773)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-06-26 18:17:50 +00:00
github-automation-metabase
a3d2acdb2f fix link (#44622) (#44625)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-26 18:09:16 +00:00
github-automation-metabase
a2f93e1963 🤖 backported "Add a repro for 'Cannot change question data source to raw data after selecting saved question'" (#44770)
* Add a repro for 'Cannot change question data source to raw data after selecting saved question'



---------

Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-06-26 18:05:36 +00:00
github-automation-metabase
fe885e5a96 🤖 backported "Exclude native query matches in search scoring when the search should exclude native queries" (#44449)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
Co-authored-by: Cal Herries <calherries@gmail.com>
2024-06-26 11:47:13 -06:00
github-automation-metabase
7e1487e639 Update default map.type display for breakouts with un-binned coordinates (#44717) (#44766)
* fix map default display type with un-binned coordinates

- default to `"map.type"` = "pin" when coordinates are not binned
- default to `"map.type"` = "grid" when coordinates are binned

* add tests

* refactor breakouts usage

Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-06-26 17:11:30 +00:00
github-automation-metabase
eefa6f9cfb 🤖 backported "Allow clicking "Remove all" for the first group in FieldPanel and omit removing the first field in the group" (#44765)
* Allow clicking "Remove all" for the first group in `FieldPanel` and omit removing the first field in the group (#44645)

* Backport some test helpers

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-26 16:54:37 +00:00
github-automation-metabase
c9f400e755 Fix broken field normalization in metadata (#44721) (#44764)
* Fix broken field normalization in metadata

* Handle Fields.actionTypes.UPDATE action in tables reducer to keep table's original_fields in sync

* Add an e2e test for fields

* Format code

* Use a different table, since accounts table is not available in e2e tests

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-06-26 16:36:10 +00:00
Nemanja Glumac
6df184acce Consolidate filter E2E reproductions for the release-x.50.x branch specifically (#44743)
* Consolidate filters reproductions

* Consolidate dashboard filters reproductions

* Add new group to the CI

* Fix recently modified tests that have different behavior in the release branch

* Unskip the repro for #18770 (Post-aggregation filters) (#44748)
2024-06-26 16:22:15 +00:00
github-automation-metabase
026ae3dbac Add reproduction for "Closing Drop-down in Join column selector causes non-drop-down columns to disappear" (#44675) (#44741)
* Add reproduction for #19894

* Use startNewQuestion

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-06-26 17:19:51 +02:00
github-automation-metabase
cbbd57319d Add E2E repro for convertTimezone error (#44715)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-26 11:07:21 -04:00
github-automation-metabase
b256db95c2 E2E test for custom date expression error (#44716)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-26 11:06:43 -04:00
github-automation-metabase
073b35af0a docs: add 50.7 to releases (#44712) (#44760)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-06-26 15:03:39 +00:00
github-automation-metabase
c6172b299d E2E repro for drilling thru with source question filters (#44714)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-26 14:19:53 +00:00
github-automation-metabase
6c6befc88a Fix appends for long column names (#44727) (#44752)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-06-26 13:49:50 +00:00
Anton Kulyk
190951ff63 Manual backport — Bump dashboard description max length limit to 1.5K (#44470) (#44751)
* Bump dashboard description max length limit to 1.5K (#44470)

* Bump dashboard description max len limit to 1.5K

* Extract `DASHBOARD_DESCRIPTION_MAX_LENGTH` const

* Handle description max length in dashboard sidebar

* Add red border to dashboard description box

* Add test

* Use `color` fn instead of CSS variables
2024-06-26 13:29:35 +00:00
github-automation-metabase
75c479325b Remove description length check from copy question form (#44736) (#44745)
Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-06-26 12:21:09 +00:00
github-automation-metabase
d1cc855d70 enable-query-caching is now default true (#44227) (#44731)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-06-26 14:55:31 +03:00
github-automation-metabase
40627162c9 Remove repro for #40223 that's not valid anymore (#44682) (#44733)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-06-26 10:53:16 +00:00
github-automation-metabase
92a42cd8ed [cache] surface last run time and make sure "nocache" won't use cache (#44679) (#44728)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-06-26 09:38:02 +00:00
github-automation-metabase
a08994cc43 Repro #35043: Date range filter - from newer to older date (#44687) (#44696)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-25 22:01:17 +02:00
github-automation-metabase
a0861565a1 Fix testing week-of-year extraction in general-timezone-support-test (#44583) (#44704)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-06-25 19:30:06 +00:00
github-automation-metabase
6bd6396ed2 add 49.18 (#44699) (#44707)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-06-25 18:53:39 +00:00
github-automation-metabase
1ff1e604c4 Fix querying TIMESTAMP WITH LOCAL TIME ZONE for oracle (#44456) (#44655)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-06-25 18:33:58 +00:00
github-automation-metabase
431cd8fc61 bump echarts (#44695) (#44700)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-06-25 18:07:03 +00:00
github-automation-metabase
d22d25d8b3 perf: disable view log and card used updates during metadata fetches (#44502) (#44634)
* perf: disable view log and card used updates during metadata fetches

* Disable writes for view_count and last_used_at

* Disable view_count tests

* Disable last-used-at tests

* Disable view_count test

* Fix view count test

* Disable view_count e2e testing

Co-authored-by: Case Nelson <case@metabase.com>
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-06-25 18:02:58 +00:00
github-automation-metabase
154bc0588e 🤖 backported "Make notebook props explicit" (#44533)
* Make notebook props explicit (#44529)

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

* attempt to fix sidebar width e2e test

---------

Co-authored-by: Oisin Coveney <oisin@metabase.com>
Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-06-25 10:32:20 -07:00
bryan
8318d7820f make scores work with zero items and max view cnts (#44692) 2024-06-25 17:15:15 +00:00
github-automation-metabase
509d8e0b34 Fix parsing of MB_JETTY_SKIP_SNI (#44651) (#44683)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-06-25 16:22:34 +00:00
github-automation-metabase
ebde7b901c Fix expressions with the same name as their base column (#44681)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-25 15:21:48 +00:00
github-automation-metabase
21007078af Add reproduction for "Result inconsistencies with Preview in GUI editor #40399" (#44630) (#44678)
* Add e2e test to verify that step previews only care about the step being previewed

* Use getNotebookStep and find preview button using cy.icon

* Remove empty line



---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-25 17:21:05 +02:00
github-automation-metabase
0d16a34429 Add e2e repro for "Join condition is not automatically selected" (#44680)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-25 15:12:20 +00:00
github-automation-metabase
39d8266f9e Split content from FilterModal into FilterContent (#44534) (#44676)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-06-25 13:09:58 +00:00
github-automation-metabase
9794af22fe 🤖 backported "convert embed.ts to ts and to use createSlice from rtk" (#44552)
* convert embed.ts to ts and to use createSlice from rtk (#44496)

* convert embed.ts to use createSlice from rtk

* only store in the state what we care about for interactive embedding

* use DEFAULT_EMBED_OPTIONS keys to filter searchOptions

* removed unused hash parameter

* adds basic unit test

* add back in the font to the redux state, as in v50 that's where we store it

* remove validation to not change logic in a minor in the backport

---------

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-06-25 15:01:07 +02:00
github-automation-metabase
e901ed308b Repro #33330: Cumulative count breaks in certain situations (#44671) (#44673)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-25 12:36:38 +00:00
github-automation-metabase
082c989b28 Repro #44550: Missing display name for the filter with an offset (#44624) (#44627)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-25 14:23:08 +02:00
github-automation-metabase
3d7f16455a 🤖 backported "Split FilterModal components into separate files and folders" (#44538)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-06-25 14:15:49 +03:00
github-automation-metabase
8ec89240dc Adjust distinct aggregation expansion on Mongo (#44442) (#44604)
This commit adds `$size` operator wrapping to `$addToSet`. That enables use of `:distinct`
clause in expressions on Mongo.

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-06-25 09:39:37 +00:00
github-automation-metabase
e816248bda 🤖 backported "convert browser.js to typescript" (#44527)
* file renamed to .ts

* fixed ts errors in browser.ts

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-06-25 11:29:50 +03:00
metabase-bot[bot]
0732da145f 🤖 backported "Effective location on collection recent items" (#44649)
* Effective location on collection recent items (#43018)

* add effective_location to recent-collection-items

* cleanup

* fix one failing test

---------

Co-authored-by: bryan <bryan.maass@gmail.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
2024-06-24 17:45:43 -07:00
github-automation-metabase
3e5dab3730 Sanitize SVG before parsing with Batik to prevent render failures when invalid characters are in the SVG content (#44516) (#44646)
* Add Temporal Units List to Dashboard Parameters Schema

Closes: #44361

This adds an entry to the Dashboard Parameter schema so that we can validate
the list of temporal_units that might be passed from the frontend when adding
or updating the `Unit of Time` type parameters.

* Sanitize the SVG before parsing it with Batik

WIP

Fixes: #43677

There are characters that are invalid according to the Batik XML Parser. This sanitizes the svg string to strip out
some of those characters so that the render can continue.

* Use the xml 1.0 spec allowed unicode chars list for the regex

* Remove accidentally merged code

* still miseed a line

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-06-24 22:54:27 +00:00
github-automation-metabase
3e71617ccb Add a try-catch for MBQL lib diagnoseExpression (#44633)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-24 20:26:17 +00:00
github-automation-metabase
7c779882be Fix the operator list for type/TextLike PKs (#44569) (#44632)
* Fix the operator list for `type/TextLike` PKs

* Fix the bug with using wrong operators

* Fix the bug with using wrong operators

* Update test/metabase/lib/filter_test.cljc



* Test FKs too

* Update test/metabase/lib/filter_test.cljc



---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-06-24 16:47:11 +00:00
github-automation-metabase
c3f115f008 🤖 backported "Fix new column shortcuts overwriting viz settings" (#44617) 2024-06-24 14:24:19 +00:00
github-automation-metabase
f22421a340 Fix setting the join strategy for not yet existing join clauses (#44557) (#44616)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-24 13:55:37 +00:00
github-automation-metabase
2fe4e42e21 Fix setting the temporal bucket of columns in a join condition to "Don't bin" (#44564) (#44615)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-24 13:50:20 +00:00
github-automation-metabase
c1b746e0f2 Fix model metadata editing for SQL models with manually sorted columns (#44614)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-24 13:44:47 +00:00
github-automation-metabase
b4e64f3f22 Add role to spec even if used in :connection-uri (#44397) (#44605)
This PR removes `:role` removal from spec, even if it was added in `:connection-uri`.
It seems that `:connection-uri` is ignored on `do-with-connection-options` code path.
Hence use of non-default roles is again available on Snowflake.

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-06-24 10:58:33 +00:00
github-automation-metabase
4fe9d5df82 xray should not filter again models with filters (#44547) (#44600)
This not only does not make sense, but also fails for models with aggregations (and thus not having those fields for filtering available).

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-06-24 08:35:54 +00:00
github-automation-metabase
6fc2737595 Update Milestone Setter (#44521) (#44592)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-24 05:31:08 +00:00
github-automation-metabase
798bf13dd6 notes on upload perms (#44575) (#44576)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-21 21:04:57 +00:00
github-automation-metabase
9815d944cf Disable Pivot Export Post Processing Step (#44561) (#44566)
This PR disables the 'make exports look pivoted' post processing step for csv and xlsx exports.

This is in response to a reported issue that Large Pivot Table downloads are failing entirely: #44556

A more hollistic fix and improvement to the post processing feature will be worked on, so the post processing code is
left untouched in this PR.

The dynamic vars in the csv and xlsx namespaces each default `false` and disable the export from running any post
processing. The var should remain `false` until we've got a plan for these types of exports, and there is no way for
users (either through ENV or UI) to change this, so the feature is effectively disabled.

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-06-21 19:18:28 +00:00
github-automation-metabase
f2ec1757fe docs - actions and public dashboards (#44551) (#44563)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-21 18:18:46 +00:00
github-automation-metabase
e674b4cf1c Set useLocalSessionState=true for MySQL DW connections [PERFORMANCE BOOST] (#44509) (#44560)
* Set `useLocalSessionState=true` for MySQL DW connections

* Fix GH issue number

* Test fixes 🔧

* Lint fix 🔧

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2024-06-21 18:00:07 +00:00
github-automation-metabase
5305bc3d13 🤖 backported "Make the App DB transaction isolation level READ_COMMITTED for MySQL [MEGA PERFORMANCE BOOST]" (#44517)
* Make the App DB transaction isolation level READ_COMMITTED for MySQL [MEGA PERFORMANCE BOOST] (#44505)

* Make the App DB transaction isolation level READ_COMMITTED for MySQL/MariaDB [MEGA PERFORMANCE BOOST]

* Add test

* empty commit to tickle CI

---------

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-06-21 14:16:10 +00:00
github-automation-metabase
97dd5f9b3c Fix - Missing schema name in data picker (#44468) (#44541)
* Show table's schema name when available

* Add a test

* Add a test for empty table schema

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-06-21 14:02:37 +00:00
Anton Kulyk
5373f68aac Manual backport — Revert graph settings sync change #44535 (#44536)
* Skip repro for 10493

* Add repro for 44532

* Remove `ensureMetricsAndDimensions`
2024-06-21 14:34:12 +01:00
Chris Truter
f08002ca76 🤖 backported "Don't analyse non-SQL cards with Macaw" (#44462) 2024-06-21 15:53:38 +03:00
github-automation-metabase
36061d0f07 Fix flaky E2E segments test (#44487) (#44497)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-21 09:56:59 +02:00
github-automation-metabase
1192e19441 Track metabase.nqa module dependencies (#44464) (#44520)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-06-21 05:34:40 +00:00
github-automation-metabase
2f44ee0467 Don't run sandboxing rollback test on mysql (#44515) (#44518)
* Don't run sandboxing rollback test on mysql

* Update test/metabase/db/schema_migrations_test.clj

Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-06-21 02:50:43 +00:00
github-automation-metabase
9bf5b65214 Oops fix the order we attempt to set DW transaction isolation in (#44501) (#44510)
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2024-06-20 21:27:58 +00:00
github-automation-metabase
dd5086b805 clarify database vs driver (#44503) (#44504)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-20 20:18:31 +00:00
github-automation-metabase
949d453ce2 🤖 backported "Fix rollback when sandboxing is configured" (#44498)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-06-20 19:47:58 +00:00
github-automation-metabase
91b2573233 🤖 backported "ci: Automatically add milestones to prs and issues" (#44357) (#44417)
* ci: Automatically add milestones to prs and issues (#44357)

* automatically add milestones to prs and issues

* test code

* test code

* test commit (#3138)

* test commit (#43320)

* test commit (#44357)

* remove test code

* add newlines

* prefer older version milestones
# Conflicts:
#	.github/workflows/check-milestone.yml
#	release/src/index.ts
#	release/src/linked-issues.ts
#	release/src/linked-issues.unit.spec.ts

* fix type error

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-06-20 11:59:15 -06:00
github-automation-metabase
fb2c5f3595 Fix unable to sync json column with value is an array (#44465) (#44483)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-06-20 15:17:33 +00:00
github-automation-metabase
5296931b28 fix(admin): Add e2e tests of the database caching policy form's basic functionality (in Admin / Performance) (#44416) (#44484)
Closes #44478

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-20 14:57:07 +00:00
github-automation-metabase
bdd82a2e5d Clarify SDK release workflow (#44385) (#44425)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-06-20 12:32:51 +00:00
github-automation-metabase
34ba4c5e6a Disable parameter mapping to native models (#44446)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-20 12:15:27 +00:00
github-automation-metabase
89f5b5f74c fix: populate param-fields for named fields on public dashboards (#44452)
Co-authored-by: Case Nelson <case@metabase.com>
2024-06-20 02:04:03 +00:00
github-automation-metabase
02f2403ed4 🤖 backported "fix(cache): Fix two bugs in Admin / Performance" (#44451)
* fix(cache): Fix two bugs in Admin / Performance (#44255)

Ensures that minimum query durations are correctly displayed in the form post-save (#44249) and that all times can be used in the Schedule component  (#44257)

---------

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-20 00:50:00 +00:00
github-automation-metabase
4a01dd8e22 User parameter value json fix (#44420) (#44448)
* UserParameterValue transforms wrapped to properly escape string vals

The `json-in` and `json-out` functions used for toucan model transforms do not perform any string escaping logic. This
makes sense as we don't want to make assumptions about the shape of data flowing in/out of the db. But, this did mean
that for the User paramter values table, string values were causing an error to be logged. This doesn't break
anything, as the function will still correctly return the string, but it can clutter up logs.

So, this PR wraps all incoming values in a map and unwraps it for outgoing values.

* Add migration to wrap existing user param values with ::wrapper key

Since the in/out transform for UserParameterValues is updated, we need to migrate any existing values to have this wrapping.

* Simplify the solution to the problem.

Since we're already getting what we need from the json-in/json-out *except* that it's logging a parse error, we can
create a json-out that works the same way (tries to parse and returns the string as-is if it fails) without logging an
error at all.

* take away the arg and keywordize inside the json-out fn

* remove irrelevant comment



* Add a little more test coverage for different value types

* faster test thanks to Dan!

* Add a comment about the data being tested

---------

Signed-off-by: Adam James <adam.vermeer2@gmail.com>
Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-06-19 23:15:33 +00:00
Nick Fitzpatrick
e0625dbe3b Manage bookmark store updates differently (#44384) 2024-06-19 19:26:29 -03:00
github-automation-metabase
af9bd29460 🤖 backported "XLSX Pivot Table Downloads have 'Native' Pivot Table" (#44445)
* XLSX Pivot Table Downloads have 'Native' Pivot Table (#43791)

* XLSX Pivot Table Downloads have 'Native' Pivot Table

Addresses: #2473

The xlsx downloads work fine for regular tables. However, on Pivot Table downloads, the resulting file isn't pivoted
and is formatted somewhat strangely (it contains additional rows related to totals, has an extra 'pivot-grouping'
column).

Now, the downloaded xlsx file contains 2 sheets:
- the data sheet containing the question's rows unpivoted. If you were constructing a pivot table yourself, you would
probably start with this shape of data.
- the pivot sheet containing a 'native' Pivot table whose reference points to the data on the data sheet, and whose
columns, rows, and values align with the cols, rows, and measures set up in Metabase

* Silly typo!

* Exported Pivot uses correct aggregation (sum, count, stddev, avg, min, max)

* data for pivot exports now also uses the formatting

* Add a test asserting that a pivot table exists in the xlsx file

* add-row! is a method dispatching on sheet class

* remove unnecessary hint

* address review feedback:

 - consolidate the aggregation function key fns into one function in the .xlsx namespace
   this was moved out of postprocessing so that the xlsx specific fns don't litter the post processing namespace at
   this time

 - clean up an unnecessary destructiring inside the native-pivot function
 - don't shadow 'name' inside the body of a fn

* Add tests that confirm zero-col and zero-row situations work

* Consolidate the atoms used to store pivot rows/options

* unstick be checks?

---------

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Adam James <adam.vermeer2@gmail.com>
2024-06-19 22:16:20 +00:00
github-automation-metabase
86b213f669 docs: Serialization API uses POST (#44439) (#44441)
* call attention to POST

* wording

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-06-19 20:26:22 +00:00
github-automation-metabase
697f964222 [QP] Fix breakouts on a nested model (#44418) (#44430)
Fixes #43993 for real.

The earlier fix #44182 was needlessly restricting the
"nominal refs" check to fields which were using numeric IDs,
when really any match on nominal refs is valid.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-06-19 18:10:01 +00:00
Anton Kulyk
d3e2c634d1 Manual backport: Fix updating table questions in the notebook editor before running a query (#44424)
* Add repro test

* Add null check
2024-06-19 18:06:15 +00:00
github-automation-metabase
5537d8c7ef [MBQL lib] Put :fields :all on joins on deleting last aggregation/breakout (#44321) (#44429)
Part of #44298.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-06-19 17:55:06 +00:00
github-automation-metabase
5122009a29 docs: change paid to pro/enterprise (#44383) (#44413)
* docs: change paid to pro/enterprise

* Apply suggestions from code review



---------

Co-authored-by: Alex Yarosh <alexandra@metabase.com>
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-19 13:21:28 -04:00
github-automation-metabase
1fb7638419 🤖 backported "fix: Do not pass template variables to findColumnIndexesFromLegacyRefs" (#44404)
* fix: Do not pass template variables to findColumnIndexesFromLegacyRefs

* Add repro

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-06-19 15:09:31 +00:00
github-automation-metabase
1dec12b8c4 docs - add 50.6 to list of releases (#44399) (#44410)
* add 50.6 to list of releases

* 49.17

Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-19 14:36:04 +00:00
github-automation-metabase
edf4310dc6 🤖 backported "Add upload button for attached data warehouse" (#44390)
* Add upload button for attached data warehouse (#43511)

* DWH plans added

* UploadCSV button component created

* Comments added

* Main nav bar updates

* Misc

* Align main nav bar button with link

* Misc comment

* Upload package created

* Various upload cleanup

* Misc

* Display button rule cleaned up

* Tracking added to upload CSV button

* Misc comment

* e2e tests WIP

* More comments

* e2e tests basic created

* NEw tracking schema

* e2e tests updated / Tracking WIP

* Analytics cleanup for button

* Misc

* Misc e2e tests Snowplow

* Removed forced Upload CSV button in FE

* Upload helpers created

* Misc unit tests updates

* Updated analytics

* Fix for e2e tests

* Upload fixture paths updated

* Misc for Snowplow

* Misc for plan

* More tests cleanup

* Misc

* Source added to analytics

* Plan unit tests fixed

* Update frontend/src/metabase/nav/containers/MainNavbar/MainNavbarContainer/MainNavbarView.tsx

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

* Update frontend/src/metabase/components/upload/constants.ts

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

* Misc imports

* Retrieving `uploads-settings` DB

* Remove default UploadCSV component export

* Misc

* Button copy updated

* Analytics updated with optional properties

* Default upload file input id updated

* csvupload schema updated

* Removed before

* No bad Snowplow events added

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
# Conflicts:
#	frontend/src/metabase/collections/components/CollectionHeader/CollectionUpload.styled.tsx

* whoops

---------

Co-authored-by: Benoit Vinay <ben@benoitvinay.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-06-19 07:53:16 -06:00
github-automation-metabase
a5fbebf4f2 🤖 backported "fix: Remove references in the FE to the deprecated enable-query-caching setting" (#44307)
* wip

* Remove references to the old enable-query-caching setting

* remove fixme

* linter

* remove some more instances

* fix imports

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-19 00:56:54 -06:00
github-automation-metabase
b388a5f1fa Pivot Tables with no Pivot Columns should still download (#44329) (#44375)
* Pivot Tables with no Pivot Columns should still download

Fixes #44159

Pivot Tables can still be valid without columns, and therefore the download should respect such a query and be
successfully exported.

In this PR, the postprocessing of pivot results into 'visual pivot' exports for csv takes into account the zero-column
configuration and the download no longer fails.

* add a test to confirm that zero cols and >1 measures works as well

* Handle the case where there are zero pivot-rows.

This is a similar problem to the zero pivot-cols case, just with rows.

The app actually doesn't render these tables correctly, but that's a separate frontend bug

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-06-18 22:48:35 +00:00
github-automation-metabase
10b1bf0f1b Fix incorrect goal line plotting when using non-linear y-axis scales (log/pow) (#44320) (#44325)
* refactor: de-duplicate variable usage

* fix incorrect goal-line plotting in pow and log y-axis scales

* add Loki variants to validate and enforce desired behavior

* update loki snapshots

Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-06-18 20:33:32 +00:00
github-automation-metabase
9211665e68 [Bug Fix] Use effective location when building initial path in entity picker (#44327) (#44360)
* use effective location when building initial path in entity picker

* unit test adjustment

* more unit test adjustments

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-06-18 13:41:48 -03:00
github-automation-metabase
ac86205b5d Fix timeline events filtering in the query builder (#44355) (#44367)
* Add repro test

* Fix timeline events filtering

* Don't include first date of next interval

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-06-18 16:05:45 +00:00
github-automation-metabase
aea44e54e5 E2E repro for "Fix issue with root collection in QuestionPicker" (#44358)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-18 14:48:22 +00:00
github-automation-metabase
6f49fb14fd Preemptively fix the E2E flake in alerty types (#44344) (#44356)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-18 13:57:33 +00:00
Chris Truter
4c0f2287cc Disable SQL analysis by default + turn off all QueryField backfills (#44346) 2024-06-18 12:12:44 +00:00
github-automation-metabase
e0b509c183 Search events 1-1-0 (#44314) (#44328)
* search events 1-1-0

* backwards compatible adjustment

* making context optional

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-06-18 08:47:34 -03:00
github-automation-metabase
1ace695931 Port test (#44303)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-18 03:07:29 +00:00
github-automation-metabase
31fe26c205 Fix remapped values in public dashboards (#44331) 2024-06-18 02:52:08 +00:00
github-automation-metabase
0803143362 Change run to make-run in process-query-for-card (#44244) (#44319)
* Change run to make-run in process-query-for-card

Fixes #44160

There were two levers where a card could change how it was run.

`qp` this is basically `qp/process-query` with some optional userland
flags and constraints marked on the passed in query.
In the case of pivot tables in the
`/pivot/:card-id/query` endpoints it was `qp.pivot/process-query`

'run' this defaults to a streaming response that takes the `qp` param
and `export-format` and passes a query to qp. Most often this is
overriden to not stream the response.

Unfortunately, if `run` is overwritten, then `qp` is thrown away, and
the caller who overrides `run` must determine the correct `qp` to use.

However, when running `process-query-for-dashcard` it is difficult to properly set
`qp` for all of the dashcards without doing card lookups. So [this commit](https://github.com/metabase/metabase/blob/release-x.50.x/src/metabase/query_processor/card.clj#L230-L232) did a check to swap the runner in the presence of a pivot query that calls the **default** runner with a `qp.pivot/run-pivot-query`. The problem is that pulse needs to use a non-default runner, but there's no way for `process-query-for-card` to do both.

This commit changes `run` to `make-run` which raises the abstraction to
a function that produces a runer given a `qp`. This allows
`process-query-for-card` to change the `qp` as needed while keeping the
passed in runner.

There's really three things going on that could be teased apart
further/better.

1. `qp` - this conflates the processor (`qp/process-query` `qp.pivot/run-pivot-query`)
  and modifying query (`qp/userland-query`,
  `qp/userland-query-with-default-constraints` `(update query :info merge info)`)
2. `make-run` - How the above are processed: (streaming/realized)

* Fix tests

Co-authored-by: Case Nelson <case@metabase.com>
2024-06-17 19:21:45 +00:00
github-automation-metabase
9e0b61003a Rework slow test group (#44286) (#44302)
* skip super slow xray test

* unmark not very slow tests

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-17 15:32:19 +00:00
github-automation-metabase
a3ac2dbb26 remove audit mentions (#44309) (#44313)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-06-17 15:31:13 +00:00
github-automation-metabase
2b09c2b48b add 50.5 (#44293) (#44294)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-17 13:35:45 +00:00
github-automation-metabase
48f6978fb8 🤖 backported "fix: Remove help email from error diagnostic modal" (#44264) 2024-06-15 10:51:17 -04:00
github-automation-metabase
d6c413541e 🤖 backported "fix(webapp): Tweak dashboard move toast to add internal spaces and ttag context" (#44256) 2024-06-15 07:11:57 -04:00
github-automation-metabase
48bfbf7ddb Fix tool-tip values not being scaled in waterfall charts (#44180) (#44260)
* fix column scaling issues in waterfall chart

- refactor dataset scaling to behave like scatter and cartesian chart models

* add E2E test

Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-06-15 01:22:55 +00:00
github-automation-metabase
67ec7d616f 🤖 backported "fix charts crash in safari when dataset timezone is not in iana format" (#44246)
* fix charts crash in safari when dataset timezone is not in iana format (#44193)

* fix charts crash in safari when dataset timezone is not in iana format

* Update Loki Snapshots

* better fix: apply offset instead of finding a timezone with such offset

* remove unused specs

* Update Loki Snapshots

* review

---------

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

* snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2024-06-14 17:17:32 -03:00
github-automation-metabase
dfb7ab5b99 Note on SQLite and cloud (#44237) (#44248)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-14 19:45:15 +00:00
github-automation-metabase
a374eb2364 Fix fields from Amazon Athena Tables failing to sync if there is not an underscore in the Table Name (#44032) (#44241)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-06-14 19:37:08 +00:00
github-automation-metabase
c44e3ee08b Update partner-and-community-drivers.md (#44218) (#44225)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-14 14:18:18 +00:00
github-automation-metabase
256fa3f81c update list of releases (#44217) (#44219)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-06-14 13:58:58 +00:00
github-automation-metabase
4589f7be25 capitalize the ‘U’ in user interface (#44196) (#44213)
Co-authored-by: Abed Habli <154609371+abdhabli@users.noreply.github.com>
2024-06-14 13:14:31 +00:00
github-automation-metabase
2d07839c45 Don't sync JWT registered claims as login attributes (#44166) 2024-06-14 07:19:47 -04:00
github-automation-metabase
dc1949c69d fix: Ensure interactive embedding CTA matches instance features (#44197) (#44203)
Co-authored-by: Oisin Coveney <oisin@metabase.com>
2024-06-14 11:14:58 +00:00
github-automation-metabase
15343a3bd5 fix(command-palette): fix docs url (#44113) (#44189)
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-06-14 03:31:30 +00:00
github-automation-metabase
72f56ddd28 feat(admin/cache): Use distinct routes for each performance tab (#44139) (#44187)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-14 01:21:33 +00:00
github-automation-metabase
a07a88cefc [QP] Fix :fields clauses in nest-query with extra aggs outside model (#44182) (#44186)
Fixes #43993.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-06-13 23:43:05 +00:00
github-automation-metabase
d1f96563d8 Adding snippets back into getCollection (#44097) (#44184)
* adding snippets back into getCollection

* e2e test

---------

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
Co-authored-by: Sloan Sparger <sloansparger@gmail.com>
2024-06-13 17:53:50 -05:00
github-automation-metabase
061a4fc4ca Relax constraints on GET /api/user/:id endpoint (#44100) (#44163)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-06-13 19:00:15 +00:00
github-automation-metabase
23e6fe8037 fix(ui-library): Don't animate Buttons (micro-PR) (#44137) (#44155)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-13 16:53:17 +00:00
Anton Kulyk
586847f7e3 Fix broken line/area/bar charts after adding a second stage filter (#44053) (#44129) 2024-06-13 16:09:47 +00:00
github-automation-metabase
c9aae62ff9 Fix invalid areas when line style is step (#44107) (#44143)
* fix area step

* specs

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-06-13 15:06:06 +00:00
github-automation-metabase
3f48eb1cbc Update Macaw to fix double blank lines (#44119) (#44133)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-06-13 14:07:45 +00:00
github-automation-metabase
833af47a0f [docs] update the list of releasts for 50.3 and 49.16 (#44125) (#44130)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-06-13 13:13:43 +00:00
Anton Kulyk
996c39928d Manual backport — Move syncColumnSettings to metabase/visualization (#44122)
* Move `syncColumnSettings` to metabase/visualization

* Remove unused `SettingsSyncOptions`

* Fix type errors
2024-06-13 13:56:45 +01:00
github-automation-metabase
855535bc25 Fix issue with root collection in QuestionPicker (#44081) (#44114)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-13 07:50:53 +00:00
github-automation-metabase
fdea4019e1 Handle errors when inferring separator of csv (#44073) (#44103)
* Handle errors when inferring separator of csv

This file

```
"c1","c2"
"a,b,c","d"
```

was failing to upload for a silly reason: when we were checking for
which separator it used, we had a parse error when using a semi-colon
and that blew up the whole pipeline.

* Use cal's helpful test suggestions

Co-authored-by: dpsutton <dan@dpsutton.com>
2024-06-12 23:06:55 +00:00
github-automation-metabase
8c66e1c4af Remove dead props in getButtonOverrides (#44082) (#44095)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-12 21:41:16 +00:00
github-automation-metabase
1a2c2da3d3 🤖 backported "certain settings should be decrypted for cache config migration to run" (#44077)
* certain settings should be decrypted for cache config migration to run (#44048)

* ~ fix test-migrations-for-driver! when rolling back and migrating again

---------

Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
Co-authored-by: Cal Herries <calherries@gmail.com>
2024-06-12 14:10:27 -07:00
github-automation-metabase
b870b71d9d docs - minor edit (#44089) (#44093)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-12 20:17:12 +00:00
github-automation-metabase
3bbec313b8 Make model persistence tab available on OSS (#44059) (#44084)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-12 19:20:33 +00:00
github-automation-metabase
5f2c11544d Fix "Manage database" perms incorrectly show up on the schema-level permissions page (#43601) (#44079)
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-06-12 19:15:38 +00:00
github-automation-metabase
0a6745fcef docs - release list 50.1 (#44076) (#44078)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-12 17:28:56 +00:00
github-automation-metabase
cc4ca8297d Fix get card query_metadata and dashboard query_metadata throws 500 when users don't have view perms on any tables (#44052) (#44057)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-06-12 15:24:27 +00:00
github-automation-metabase
41ee7e1915 fix single series bar hover (#43984) (#44031)
* fix single series bar hover

* prefer reduced motion

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-06-12 14:33:18 +00:00
Nemanja Glumac
d8c4b94def Fix scrollbar interaction in the custom expression suggestion list (#43995) (#44036)
* Fix dismissing popup

* Undo revert

* Merge refs

* Update frontend/src/metabase/query_builder/components/expressions/ExpressionEditorTextfield/ExpressionEditorTextfield.tsx



* Update frontend/src/metabase/query_builder/components/expressions/ExpressionEditorSuggestions/ExpressionEditorSuggestions.tsx



* Update frontend/src/metabase/query_builder/components/expressions/ExpressionEditorSuggestions/ExpressionEditorSuggestions.tsx



* Use semantically correct HTML

* Fix popmenuTarget type

---------

Co-authored-by: Ivan Križnar <hyperNURb@users.noreply.github.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-06-12 13:55:08 +00:00
github-automation-metabase
7d18651366 Restore icons in the new filter popup (#44025) (#44044)
* Restore icons in the new filter popup

* it.each

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-06-12 08:22:38 +00:00
github-automation-metabase
2f98f64820 Fix "collection items sorting" E2E flake (#44023) (#44027)
* Fix "collection items sorting" E2E flake

* Add comments

* Remove the `@flaky` tag

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-12 07:26:41 +00:00
github-automation-metabase
d3af4f9257 uploads in config file (#43891) (#44020)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-11 18:15:54 +00:00
github-automation-metabase
186b9cfdf4 Fix E2E flake in the native_subquery spec (#43991) (#44000)
* Re-work `startNewNativeQuestion` helper

* Fix native_subquery flakes

* Simplify the helper

* Remove the `flaky` tags

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-11 17:36:01 +02:00
github-automation-metabase
c71e0776b4 Fix "line/bar chart" tooltip flake (#43975) (#44004)
* Fix the typo

* Replace `realHover` with the `mouseMove` trigger

* Be explicit when targetting elements by their index

* fix combo chart tooltip e2e specs

* cy.wait as a last resort

---------

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2024-06-11 15:13:16 +00:00
github-automation-metabase
e197398eee docs - updates for 50 (#44002) (#44005)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-11 14:40:32 +00:00
github-automation-metabase
430f266b28 Fix the flaky "bookmark" E2E test (#43965) (#43972)
* Fix the flaky "bookmark" E2E test

Resolves #43871

* Remove the `flaky` tag

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-11 14:10:40 +02:00
github-automation-metabase
0031c25622 Add connection string parsing to Snowflake (#43923) (#43968)
* Add connection string parsing

* Add test case with role suffixed key

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-06-11 07:40:22 +00:00
github-automation-metabase
4fd3d5cae7 ci(sdk): Remind SDK PR author to use conventional commits PR title (#43932) (#43988)
* Remind embedding SDK PR author to use conventional commits

* Only remind PR author when PR title isn't conventional commits

* Add branch for testing

* Fix gh cli command

* Fix getting wrong user login

* Ensure we don't create more than 1 comment

* Improve comment format

* Add more info for non-changelog related type

* Check non-changelog related types

* Update the comment for consistency

* Revert "Add branch for testing"

This reverts commit 4a1be68828.

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-06-11 06:32:52 +00:00
github-automation-metabase
9f50327e6d 🤖 backported "fix bar normalized stacking breaks line charts" (#43977)
* fix bar normalized stacking breaks line charts (#43957)

* fix bar normalized stacking breaks line charts

* spec

* move stackable settings

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2024-06-10 21:56:35 -03:00
github-automation-metabase
487bec13f5 🤖 backported "Bulk load data for can_run_adhoc_query and table metadatas" (#43948)
* Bulk load data for can_run_adhoc_query and table metadatas (#43899)

* Fix tests

---------

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-06-10 21:01:12 +00:00
github-automation-metabase
4fe42d3635 If there is an error in sync processes, make sure we catch the right exception (#43821) (#43910)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-06-10 22:03:02 +02:00
github-automation-metabase
58501faab9 🤖 backported "Remove classnames" (#43945)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-10 20:00:58 +00:00
github-automation-metabase
4374b0d6e9 Enable Clojure logging in the browser (#43959) (#43966)
Messages at INFO level and higher will appear in the browser console.

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-06-10 19:46:28 +00:00
github-automation-metabase
6203fef708 🤖 backported "Fix stacked redirects to homepage dashboard crashing the app" (#43931)
* Fix stacked redirects to homepage dashboard crashing the app (#43836)

* Add repro test

* Move home selectors to `metabase/selectors/app`

* Prevent unnecessary redirects to home dashboard

* Rename

* Handle navbar home link

* Fix unit tests

* Fix navigating away from an archived dashboard

* Handle sub-root Metabase URLs

* Fix dashboard state sync

---------

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-06-10 19:34:54 +00:00
github-automation-metabase
17013fb939 Actually validate view_log.context matches ::view-log/context on insert (#43801) (#43955)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-06-10 19:04:19 +00:00
github-automation-metabase
af95198333 🤖 backported "[Cache] Fix save button bug and several smaller issues" (#43941) 2024-06-10 19:01:58 +00:00
github-automation-metabase
13acdfae9d 🤖 backported "Fix "CC typing suggestion" E2E flake" (#43958)
Co-authored-by: Nemanja <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-10 21:01:24 +02:00
github-automation-metabase
c6b6f27aa5 🤖 backported "docs - line charts updates" (#43888) 2024-06-10 17:53:48 +00:00
github-automation-metabase
32d07554ea Fix flaky E2E test "sidebar should be resizable" (#43947) (#43952)
* Fix flaky E2E test "sidebar should be resizable"

* Remove the `flaky` tag

* Remove unused intercept

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-10 19:47:34 +02:00
github-automation-metabase
c7124636c7 Note on locked filters (#43886) (#43925)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-10 19:36:23 +02:00
github-automation-metabase
c8cd1e9346 🤖 backported "docs - models and caching" (#43732) 2024-06-10 15:21:37 +00:00
github-automation-metabase
7977665161 Change the uploads-enabled setting's visibility to internal (#43849) (#43929)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-06-10 14:53:55 +00:00
github-automation-metabase
ad903eab3b 🤖 backported "Add recents to Browse models table" (#43882) 2024-06-10 10:37:36 -04:00
github-automation-metabase
351f9b2ef9 Fix width of save button in cache sidebar (#43755) (#43771)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-10 14:06:56 +00:00
github-automation-metabase
ed020c81f5 Remove dead code (#43603) (#43772)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-10 13:53:52 +00:00
github-automation-metabase
3c74d93ef1 [MBQL lib] Move the field_ref matching hack from #43848 (#43902) (#43903)
I'm not sure it's any less hacky in the CLJS but it keeps the TS
wrappers thin.

Context:
- #43799 is the original issue
- #43848 added the hack being removed here

Co-authored-by: Braden Shepherdson <braden@metabase.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-10 13:25:41 +00:00
github-automation-metabase
7be7a15e56 Micro-edit: spaces not white spaces (#43860) (#43897)
This PR simplifies a bit of text used in the cache cron schedule component: we can say "spaces" (which is normal English) not "white spaces" (which is developerese)

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-10 13:23:22 +00:00
Nicolò Pretto
54567809f8 Backport ea7bd55939 (#43833)
* PublicDashboard -> PublicOrEmbeddedDashboard

* file renames and some fixes for PublicOrEmbeddedDashboard

* PublicQuestion -> PublicOrEmbeddedQuestion (file renames)

* PublicDashboard -> PublicOrEmbeddedDashboard

* isPublic prop -> isPublicOrEmbedded in Dashboard and Dashcard
2024-06-10 11:46:10 +02:00
github-automation-metabase
addb2fe2a1 Fix flaky skip-if-empty-test by making sure pulse card follow ordres (#43913) (#43916)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-06-10 08:51:59 +00:00
github-automation-metabase
288919d942 Task history sorted by started at (#43809) (#43911)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-06-10 07:03:34 +00:00
github-automation-metabase
a2caa4e957 Fix stacked bar chart tool-tips when total value is negative (#43883) (#43907)
* fix stacked bar chart tooltips when total value is negative

* add E2E test

Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-06-10 03:42:30 +00:00
github-automation-metabase
994e658f29 43475 command palette icon tweaks (#43652) (#43904)
* Initial commit

* unit test, always white on active

* Run Prettier 🙄

* removing yellow color from verified model icon

* linter and type fix

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-06-09 14:08:16 -06:00
github-automation-metabase
a5164f86b0 [sync] parse naked json values (#43812) (#43828)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-06-08 05:51:11 +00:00
github-automation-metabase
4c615b96b8 add line symbol on hover (#43887) (#43900)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-06-08 00:45:23 +00:00
github-automation-metabase
a4f043b9c3 🤖 backported "Fix parameter mapping with models" (#43898)
* backported "Fix parameter mapping with models"

* Fix auto-wiring

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-08 00:43:06 +00:00
Aleksandr Lesnenko
1aa418781b Backport viz fixes for v50 (#43892)
* fix data labels under trend/goal lines (#42928)

* fix data labels under trend/goal lines

* fix fontFamily missing

* update specs

* fix type errors

* snapshots

---------

Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>

* Set min bar height for non-zero bars (#43485)

* set min bar height for non-zero values

* fix y-axis split logic uses transformed dataset instead of actual data

* fix timeline events covers series (#43780)

* make compact formatting consistent across all series (#43472)

* make compact formatting consistent across all series

* fix rebase

* resolve yarn.lock conflicts

* snapshots

---------

Co-authored-by: Emmad Usmani <emmadusmani@berkeley.edu>
2024-06-07 22:09:13 +00:00
github-automation-metabase
10872f5099 reset series displays when changing card display (#43868) (#43890)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-06-07 22:08:06 +00:00
github-automation-metabase
e656c266ed Fix unit test (#43895) (#43896)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-07 22:07:58 +00:00
github-automation-metabase
a560fb1875 Use params instead of body in RTK Query GET requests (#43786) (#43889)
Resolves #41511

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-07 21:44:32 +00:00
github-automation-metabase
38705050bc [Browse] Remove Metabase analytics models from Browse models (#43778) (#43881)
Closes #43251

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-07 21:07:56 +00:00
Jeff Bruemmer
ddf804650d update env vars (#43885) 2024-06-07 21:05:30 +00:00
github-automation-metabase
d5bab77672 🤖 backported "Move around audit content to make perm checks more consistent + general cleanup" (#43867)
Co-authored-by: Noah Moss <noahbmoss@gmail.com>
2024-06-07 20:57:14 +00:00
github-automation-metabase
c278421f4a Use RTK Query to obtain task/job information (#43798) (#43865)
* Type `TaskInfo`

* Re-write `JobInfoApp` to use RTK Query

* Re-write `JobTriggersModal` to use RTK Query

* Remove unused `fetchJobInfo` action

* Remove `TaskApi` from `services.js`

* Remove `JobApp` styled component

* Simplify fetching logic

Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-07 20:30:36 +00:00
github-automation-metabase
413bcc5022 docs - update upload setting metadata (#43855) (#43863)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-07 20:27:08 +00:00
github-automation-metabase
4e56b743de Upgrade @testing-library/cypress to v10.0.2 (#43842) (#43864)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-06-07 20:03:51 +00:00
github-automation-metabase
affdaa6a4a 🤖 backported "Add events to measure search performance" (#43784)
* Add events to measure search performance (#43135)

* new_search_query event

* Filters in object, search click event

* updating event schema

* type and event schema adjustments

* delete comments BE code

* adjusting tests

* PR feedback

* typos and spacing

* removing archived filter

---------

Co-authored-by: John Swanson <john.swanson@metabase.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2024-06-07 16:51:34 -03:00
github-automation-metabase
fcd916ad80 Fix typo (#43808) (#43861)
Fixes a small typo

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-07 19:33:48 +00:00
github-automation-metabase
99b400880c Fix CloudPanel unit flake (#43856) (#43862)
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-06-07 18:54:25 +00:00
Ryan Laurie
c9df622af4 Mark flaky tests for v50 Release Branch (#43839) 2024-06-07 12:00:09 -06:00
github-automation-metabase
4bd5e7756c Move database role to url parameters from connection properties on Snowflake (#43602) (#43765)
* Move role to url parameters from connection properties

* Fix test

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-06-07 17:37:09 +00:00
github-automation-metabase
c56362ff0b 🤖 backported "Run smaller smoke test suite for pre-release check" (#43825)
* Run smaller smoke test suite for pre-release check (#43633)

* run smaller smoke test suite for pre-release check

* fix run command

* kick ci

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-06-07 16:25:24 +00:00
github-automation-metabase
2e3d1e8519 ci(sdk): Automate merging SDK doc PR (#43751) (#43834)
* Automate SDK doc PR

* Prevent auto merge

* Dry run npm publish for testing

* Speed up testing by not building jars

* Fix auto approve step

* disable concurrency so I could test multiple runs in parallel

* Test auto-merge

* Fix auto merge

* Revert "disable concurrency so I could test multiple runs in parallel"

This reverts commit 60e90076eb.

* Revert "Speed up testing by not building jars"

This reverts commit 4e53a54414.

* Revert "Dry run npm publish for testing"

This reverts commit 9b5d761c8d.

* Enable all commented out steps

* Remove unnecessary steps

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-06-07 16:20:37 +00:00
github-automation-metabase
0daf4b1838 ci(sdk): Ensure we append new release to the chaneglog instead of overwriting it. (#43729) (#43830)
* Mock that the changelog is different from the one in master

* Apply changelog patch incase the changelog is created from another branch

* Dry run npm publish so I could test

* Fix failed patch

* Speed up testing by not building jar

* Fix adding new changelog to master

* feat(sdk): A placeholder for an actual feature in the changelog

* Mock that the changelog diverges from master

* Revert "Speed up testing by not building jar"

This reverts commit acb80d7465.

* Revert "Dry run npm publish so I could test"

This reverts commit f4e679efd9.

* Revert "Mock that the changelog diverges from master"

This reverts commit 0e77a68e1b.

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-06-07 16:12:15 +00:00
metabase-bot[bot]
14794c7b14 🤖 backported "[forward-port] More upload test changes for clickhouse (#42531)" (#43530)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-06-07 09:52:32 -06:00
github-automation-metabase
a3bcd0a87e Multi Series Dashcards Render with Filters Applied To All Series (#43428) (#43758)
* Multi Series Dashcards Render with Filters Applied To All Series

Fixes: #39083

Multi-series dashcards now properly render when a subscription is set up with filters that impact the values of each
card in the multi-series card.

* Small refactor for executing dashcards in a pulse context.

- move execute-dashboard-subscription to pulse.util
- this fn now will also execute all card series cards
  and put those results into a list on the key :series-results in the dashcard
  which is then used in the render multimethod to send the correct data to the javascript context

A small todo was taken care of as well, we can now use :dashboard-subscription in the :context key

* Fix up render fn

The shape of hte data going into the javascript was a bit unclear before. This keeps things a little more
understandable.

Next step is probably to create some Malli schemas inside the js_svg namespace to document and enforce the needed data shapes

* pull :data up a level from :result in the series cards

* Update src/metabase/pulse/render/body.clj



* Remove unneeded let

* set/rename-keys won't work here because we raise the :data key

I've realised a suggested change to just use set/rename-keys won't do what we need. We need instead to raise :data
from within the result key up to the same level (and dissoc result).

I've renamed the helper function to make its purpose a bit clearer

---------

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-06-07 15:44:40 +00:00
github-automation-metabase
01b25358a7 format sql (#43753) (#43824)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-06-07 14:01:44 +00:00
John Swanson
3589efcd01 Fix remaining tinyint booleans in MySQL (#43296) (Backport #43296) (#43782)
Liquibase changed their boolean type in MySQL from `bit(1)` to
`tinyint(4)` in version 4.25.1. Our JDBC driver does not recognize these
as booleans, so we needed to migrate them to `bit(1)`s.

As discussed [here](#36964), we
changed all existing `boolean` types that were in the
`001_update_migrations.yml` but not the SQL initialization file.

For new installations, this works: things in the SQL initialization file
get created with the `bit(1)` type.

However, for existing installations, there's a potential issue. Say I'm
on v42 and am upgrading to v49. In v43, a new `boolean` was added.

In this case, I'll get the `boolean` from the liquibase migration rather
than from the SQL initialization file, and it need to be changed to a
`bit(1)`.

I installed Metabase v41 with MySQL, migrated the database, and then
installed Metabase v49 and migrated again. I made a list of all the
columns that had the type `tinyint`:

```
mysql> SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLUMN_TYPE,        COLUMN_DEFAULT, IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_TYPE = 'tinyint' AND TABLE_SCHEMA='metabase_test';
+---------------+------------------------------+-------------------+-------------+----------------+-------------+
| TABLE_SCHEMA  | TABLE_NAME                   | COLUMN_NAME       | COLUMN_TYPE | COLUMN_DEFAULT | IS_NULLABLE |
+---------------+------------------------------+-------------------+-------------+----------------+-------------+
| metabase_test | core_user                    | is_datasetnewb    | tinyint     | 1              | NO          |
| metabase_test | metabase_field               | database_required | tinyint     | 0              | NO          |
| metabase_test | metabase_fieldvalues         | has_more_values   | tinyint     | 0              | YES         |
| metabase_test | permissions_group_membership | is_group_manager  | tinyint     | 0              | NO          |
| metabase_test | persisted_info               | active            | tinyint     | 0              | NO          |
| metabase_test | report_card                  | dataset           | tinyint     | 0              | NO          |
| metabase_test | timeline                     | archived          | tinyint     | 0              | NO          |
| metabase_test | timeline                     | default           | tinyint     | 0              | NO          |
| metabase_test | timeline_event               | archived          | tinyint     | 0              | NO          |
| metabase_test | timeline_event               | time_matters      | tinyint     | NULL           | NO          |
+---------------+------------------------------+-------------------+-------------+----------------+-------------+
10 rows in set (0.01 sec)
```

Then wrote migrations. For each column, we:

- turn it into a `bit(1)`,

- re-set the previously existing default value, and

- re-add the NOT NULL constraint, if applicable.

---------

Co-authored-by: SakuragiYoshimasa <ysrhsp@outlook.com>
2024-06-07 06:11:36 -07:00
github-automation-metabase
757ba8b5a8 Change MySQL ENUM columns to have base_type=type/TextLike (#43533) (#43804)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-06-07 12:42:58 +00:00
github-automation-metabase
115b8df9e2 🤖 backported "[Cache] Move model caching form to Admin / Performance" (#43285)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-07 06:22:12 -04:00
github-automation-metabase
b3209dc880 🤖 backported "Tweak appearance of cache page and form" (#43276)
On the Browse models page we have a filter icon which opens a popover with a switch that toggles "Show only verified models". With this change, the icon is not rendered if there are no verified models at all.

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-07 06:20:33 -04:00
github-automation-metabase
e37e250a0c 🤖 backported "[Browse] Show Browse models link in nav only when there are models" (#43748)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-07 06:17:48 -04:00
github-automation-metabase
bdd4bf859a Highlight the table cell data in dashboards when the cell is an ID column (#43728) (#43777)
* highlight id cell column

* add simpletable stories

* add simple table test data

* add loki reference image

* Update frontend/src/metabase/visualizations/components/TableSimple/TableCell.styled.tsx



---------

Co-authored-by: Phoomparin Mano <poom@metabase.com>
Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2024-06-07 06:20:42 +00:00
github-automation-metabase
c07f5ca781 Fix RowChart X-Axis ticks formatter (#43783) (#43796)
* fix RowChart XAxis ticks formatter

- remove scaling from x-axis tick values like we did for y-axis tick values in ECharts charts

* add loki variant

Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-06-06 23:25:32 +00:00
github-automation-metabase
4938ad3038 hide "show_series_values" setting when "show_values" setting is disabled (#43785) (#43794)
Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-06-06 22:35:22 +00:00
github-automation-metabase
a1e1e607e5 🤖 backported "Fix column scaling ("Multiply by a number") bugs" (#43690)
* Fix column scaling ("Multiply by a number") bugs (#43668)

* return empty string so non-empty labels do not get hidden by empty labels

* fix function name

* apply scaling in transformed dataset

* add missing option to OptionsType

* fix double scaling

* add column scaling to waterfall transformed dataset

* add column value scaling to dataset transform

* fix stacked bar segment labels not responding to column scaling

* fix tooltip values displayed

* since scaling as added to transformedDataset, use transformedDataset for formatters

* revert changes to display percentage instead of absolute value

* fix stacked data labels

* add loki variant for custom y-axis range with column scaling

* fix stack segmented label formatters compact calculation

* scale original dataset and use that instead of modifying transformedDataset

* update loki snapshots

* fix scatter plot dataset scaling

* fix tooltip values being double scaled

* add E2E test to validate behavior

* add helper for not duplicating the column scaling

* port multiple y-axis metrics with column scaling fixes to RowChart

* add waterfall and scatterplot loki variants

* fix type errors and failing unit tests

* fix failing unit tests

* update loki snapshots

* update loki snapshots

---------

Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-06-06 22:13:50 +00:00
github-automation-metabase
e2367747ed 🤖 backported "Fix OSS tests in CI" (#43730)
* Fix OSS tests in CI (#43660)

* fix OSS tests in CI

* update tests that went on vacation for a while

* do safer cypress things

* better helper name
# Conflicts:
#	e2e/support/helpers/e2e-ui-elements-helpers.js
#	e2e/test/scenarios/collections/instance-analytics.cy.spec.js
#	e2e/test/scenarios/models/reproductions.cy.spec.js
#	e2e/test/scenarios/permissions/permissions-reproductions.cy.spec.js
#	e2e/test/scenarios/question-reproductions/reproductions-2.cy.spec.js
#	e2e/test/scenarios/question/new.cy.spec.js

* manual backport to changed spec files

* gross manual backporting

* fix conflict

---------

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-06-06 16:49:36 -05:00
github-automation-metabase
6193ca96c0 Update translations for v50 and add Danish Language Support (#43314) (#43763)
* update translations for v50

* add Danish

* update translations for v50 release

* alphabetical order is nice

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-06 20:22:45 +00:00
github-automation-metabase
7cabe88248 🤖 backported "Batch load card metadata" (#43739)
* Add backport resolution script

* Batch load card metadata (#43625)

* Delete backport.sh

* Hydrate can_run_adhoc_query and address review comments (#43747)

This is a followup on #43625.

* Fix test

---------

Co-authored-by: Metabase bot <metabase-bot@metabase.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
Co-authored-by: Tamás Benkő <tamas@metabase.com>
2024-06-06 21:56:32 +03:00
github-automation-metabase
92d38de79f 🤖 backported "Fetch ad-hoc query metadata on the BE" (#43726) 2024-06-06 18:06:11 +00:00
Nemanja Glumac
79f1bd4b43 Add E2E reproduction for #39150 to v50 (#43745) 2024-06-06 18:53:31 +02:00
github-automation-metabase
dede8ba935 update list of releases (#43754) (#43757)
Co-authored-by: Alex Yarosh <alexandra@metabase.com>
2024-06-06 16:47:13 +00:00
Noah Moss
c4620eeb8f Backport #43331 - collection search results with effectve_parent (#43540) 2024-06-06 15:21:39 +00:00
github-automation-metabase
2f37184c63 do not output exceptions used only for tests (#43723) (#43733)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-06-06 14:48:00 +00:00
github-automation-metabase
77e9ddebff More wiring and documentation around Macaw (#43580) (#43673)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-06-06 09:46:51 +00:00
github-automation-metabase
8d4cd04e11 Followed-up tasks for changelog generation (#43656) (#43719)
* Check git tag for an exact match

* Set npm publish to dry run, so I can test

* Uses new github automation account for creating a PR

* Remove unnecessary step

* Automatically set `no-backport` on the SDK doc version bump PR

* Fix step to edit PR with correct permission

* Remove npm dry run after finished testing

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-06-06 07:44:46 +00:00
github-automation-metabase
b2ae779d23 🤖 backported "Remove Google Analytics driver" (#43401)
* Remove Google Analytics driver

* Remove more GA-related tests

* Un-remove tests that aren't related to GA

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
Co-authored-by: Cam Saul <github@camsaul.com>
2024-06-05 18:09:07 -07:00
github-automation-metabase
5f0c0199e0 Expose attached-dwh token feature flag to frontend (#43657) (#43678)
This allows frontend code to conveniently check whether the feature
flag is enabled or disabled.  This is in addition to the raw flag's
presence (or absence) in `(:features token-status)`.

References: https://github.com/metabase/metabase/issues/42381
References: https://github.com/metabase/metabase/pull/43511

Co-authored-by: Dennis Schridde <63082+devurandom@users.noreply.github.com>
2024-06-05 20:43:01 +00:00
github-automation-metabase
9064b7503c Fix long field names handling for series names and in the model editor (#43394) (#43682)
* Fix long names in model editor

* Fix long names in series name input

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-06-05 19:45:12 +00:00
github-automation-metabase
1f46268f23 Performance fix for getUrlWithParameters when there are no parameters (#43626) (#43680)
* Simple performance fix for getUrlWithParameters

* Fix tests

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-06-05 19:32:17 +00:00
github-automation-metabase
df04e7c0a9 column heading options (#43409) (#43679)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-05 18:11:38 +00:00
github-automation-metabase
8dc2d00936 Demonstrate nesting dynamic redefines (#43496) (#43670)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-06-05 17:33:55 +00:00
github-automation-metabase
f484786186 🤖 backported "Populate Macaw options based on database type" (#43506)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-06-05 15:35:38 +00:00
github-automation-metabase
3e1d6766ac 🤖 backported "Only log views for cards in a dashboard if the user views the tab" (#43482)
Co-authored-by: Cal Herries <calherries@gmail.com>
2024-06-05 08:44:16 -06:00
github-automation-metabase
872f8b63d8 🤖 backported "Catch exceptions from driver/database-supports? outside driver code" (#43520)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-06-05 08:44:07 -06:00
github-automation-metabase
617895ed64 docs - druid jdbc and json unfolding (#43267) (#43535)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-05 10:03:18 -04:00
github-automation-metabase
f6d2e2af80 Fix flaky interactive-embedding.cy.spec.js (#43588) (#43640)
* Fix flaky test

* Fix the flake for real

* Fix stress test failing because of mismatched height

* Review: Move viewport setting to shared config

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-06-05 14:42:48 +01:00
github-automation-metabase
aa1d1130d3 notes and links to relevant docs (#42975) (#43539)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-05 13:35:09 +00:00
github-automation-metabase
1875789075 Docs env var info (#43150) (#43592)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-05 09:31:57 -04:00
github-automation-metabase
c3fbfa3456 docs - caching updates (#42857) (#43604)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-05 09:31:41 -04:00
github-automation-metabase
78e06b837f docs - license step (#43534) (#43620)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-06-05 09:31:25 -04:00
github-automation-metabase
2fe2042505 uses data-autofocus attribute to avoid mantine modal moving focus to the modal close button (#43546) (#43632)
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-06-05 08:10:44 -05:00
github-automation-metabase
f0147f6881 🤖 backported "Fix multiple origins support by handling invalid origins" (#43288)
* Revert "Revert "minimal support for multiple values for Access-Control-Allow-Origin (#42888)" (#43125)"

This reverts commit a4312230a8.

* refactor: extracted parse-approved-origins + supported "*" without special case

* fix: parse-approved-origins won't break on multiple spaces in a row

* handles invalid urls in the origins + some formatting

* log instead of throwing in parse-url + simplify the logic in parse-approved-origins

* simplify parse-approved-origins logic by splitting on "at least one space"

* remove extra boolean call

* approved-origins -> approved-origins-raw to better reflect that it's a raw string

* swap the order of the arguments to `is` in the tests

* indentation 🙃

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-06-05 15:09:17 +02:00
github-automation-metabase
435cd790e1 remove modified padding on ellipsifyed sidebar items (#43585) (#43614)
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-06-05 09:00:35 -03:00
github-automation-metabase
7be21c089a Use a more obvious test error message (#43642) (#43648)
(When scrolling through CI logs I always do a double-take when I see a
huge stack trace with "Just an error". I think this is a little
clearer?)

Co-authored-by: Tim Macdonald <tim@metabase.com>
2024-06-05 10:57:38 +00:00
metabase-bot[bot]
1a42d371ee [serdes] unify snowplow analytics in a single event (#43218) (#43230)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-06-05 08:12:10 +00:00
github-automation-metabase
4a186e1a35 [cache] config should be editable if entity is accessible (#43522) (#43639)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-06-05 06:48:18 +00:00
github-automation-metabase
94703f0ae8 Make Backports Automerge Again (#43635) (#43636)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-05 01:16:35 +00:00
github-automation-metabase
ba3b9a6ab1 🤖 backported "Release from tagged test jars" (#43624)
* allow releasing from tagged test jars

* always listen to nemanja

* use java 17

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-06-04 17:15:23 -06:00
Jeff Bruemmer
dde6cf6924 update env var docs (#43612) 2024-06-04 22:00:12 +00:00
github-automation-metabase
e35a696b99 🤖 backported "[Browse] Don't show filter icon when no models have been verified" (#43569)
On the Browse models page we have a filter icon which opens a popover with a switch that toggles "Show only verified models". With this change, the icon is not rendered if there are no verified models at all.

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-04 17:29:44 -04:00
github-automation-metabase
1124821d12 🤖 backported "[Browse] Unify breadcrumbs into one link" (#43567)
Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-04 17:29:25 -04:00
github-automation-metabase
5ac7c6f17c 🤖 backported "[Browse] Add brand-colored dot to filter icon when the filter is active" (#43591)
Closes #42964

Co-authored-by: Raphael Krut-Landau <raphael.kl@gmail.com>
2024-06-04 17:29:01 -04:00
github-automation-metabase
749bc81ce2 loki CI improvements (#43607) (#43609)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-06-04 16:11:58 -03:00
github-automation-metabase
638a53a8c0 backported Add can_run_adhoc_query to Card hydration (#43595)
Co-authored-by: Case Nelson <case@metabase.com>
2024-06-04 16:55:16 +00:00
github-automation-metabase
b100a45a62 Amend stack values labels control copy (#43553) (#43566)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-06-04 13:18:00 -03:00
github-automation-metabase
2571e765b0 🤖 backported "temporarily removes the SameSite=None suggestion box" (#43584)
* temporarily removes the SameSite=None suggestion box

* fix copy

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-06-04 16:36:23 +02:00
github-automation-metabase
abde2fa1fc 🤖 backported "refactor public/embed reducers and related code" (#43574)
* move parameters and dashboard reducers to the common ones as they're used everywhere

* convert reducers-{common,main,public}.js to typescript, done with --no-verify

* convert reducers to named exports

Co-authored-by: Nicolò Pretto <info@npretto.com>
2024-06-04 15:27:29 +02:00
John Swanson
5ecde724b4 Add a type to collections returned by search (#42535) (#43255)
Under:

- `item.type`

- `item.collection.type`, and

- `item.collection.effective_ancestors.*.type`
2024-06-04 05:28:31 -07:00
github-automation-metabase
624a4d7d25 🤖 backported "Update macaw for qualified rename support" (#43399)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-06-04 10:43:03 +00:00
github-automation-metabase
85fdd64ffc Update dead jetty docs links (#43573) (#43577)
* Update dead jetty docs link

* Update dead jetty docs link

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-06-04 09:56:46 +00:00
github-automation-metabase
0093d8a1ab 🤖 backported "Skip fingerprinting or scanning field values for fields with base_type=type/*" (#43542)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-06-03 18:01:53 -06:00
github-automation-metabase
765509c259 measure auto compactness on correct values (#43477) (#43528)
* measure auto compactness on correct values

* snapshots

Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-06-03 16:11:48 -03:00
github-automation-metabase
fc1256167a 🤖 backported "Handle MySQL quotes when resolving analyzed fields" (#43465)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-06-03 21:01:34 +02:00
github-automation-metabase
ef5e8fb928 🤖 backported "Don't throw an exception when a non-existent setting is in the config file" (#43521)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-06-03 10:39:50 -06:00
github-automation-metabase
71ffa0afb0 🤖 backported "Single metadata endpoint for cards" (#43481) 2024-06-03 15:19:12 +00:00
github-automation-metabase
37c901325c fix stacked data labels on ordinal charts (#43469) (#43508)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-06-03 15:03:29 +00:00
github-automation-metabase
abed3e9712 Fix mariadb failed to migrate due to having deep nested revision (#43434) (#43487)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-06-03 21:24:59 +07:00
github-automation-metabase
28ae5fac10 Fixes LDAP admin settings form not allowing modification if a custom port is set (#43476) (#43479)
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-06-03 09:10:53 -05:00
github-automation-metabase
7a8b73e298 Show the columns for the correct stage when using combine/extract in the presence of an aggregation (#43226) (#43450)
* Do not use asReturned to determine columns for extractions and combine columns

* Add reproduction for #43226 for combine columns

* Add reproduction for #43226 for extract columns

* Remove commented out code

* Only render extraction shortcut when there are extractions

* Only render combination shortcut when there are combinations

* Use hasCombinations from CombineColumns

* Add hasExtractions from ExtractColumn

* Use appendStageIfAggregated over Lib.asReturned

* Only show combine column shortcut when there are two or more columns to be combined

* Lift appendStageIfAggregated to top-level drill

* Add test for extraction on table with just breakout

* Add test for combinations on table with just breakouts

* Disable the 2-column requirement for combinations

* Remove Lib.asReturned in appendStageIfAggregated

* Remove + 1 to stageIndex in appendStageIfAggregated

* Check for empty breakouts too in as-returned

* Switch back to Lib.asReturned

* Fix test for combine column on breakouts

* Reference the correct query and stageIndex

* add CLJS unit tests for as-returned with only aggs, breakouts

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-06-03 09:31:16 +02:00
github-automation-metabase
481ae83556 Fix unit tests running multiple times in watch mode (#43445) (#43448)
* Fix unit tests running multiple times in watch mode

* Ignore even more

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-06-03 14:22:18 +07:00
github-automation-metabase
3d4732c484 Fix data labels too dense with large single series (#42985) (#43486)
* remove unused variable

* conditionally render labels sparsely if large amount of data points

* update loki snapshots

* refactor data label formatter conditions

* setup intelligent label plotting

* handle the case when there are no labels

* add sparse data label rendering to bar charts

* do not compute if no labels need to be shown or hidden

* add sparse data labeling to waterfall charts

* adjustment for large series waterfall labels

* revert change

* refactor name

* add sparse labels to stacked bar and area

* improve scaleFactor

* fix type errors

* remove unused labelFormatter

* update snapshots

* patch ECharts

- labels with no text, i.e. "", were still being considered as plot-able labels which was causing labels with real text "asdfec.." to be hidden because of overlap.
- This patch makes it so that labels with no text, i.e. "", are not considered to be candidates for overlap checking.

* update loki snapshots

* only loop over dataset once for getWaterfallChartDataDensity

* improve performance of chart data density calculations

* update loki snapshots

* update E2E spec

* update E2E spec

* increase cartesian label density allotment

* update loki snapshots

* update loki snapshots

* comment out node_modules cache since it cannot be skipped by commit and is breaking CI

* fix type errors

* Reset node modules if patches are changed

* refactor type naming

---------

Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir.dev@gmail.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-06-01 15:27:41 -04:00
github-automation-metabase
e73ece0ab8 Move loading of linked targets metadata to the BE (#43380) (#43442)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-05-31 23:37:53 +00:00
github-automation-metabase
85ccbdaca9 🤖 backported "Add Advanced Cache Upsell" (#43456)
* add hook to check token features

* add cache upsell to performance page

* upsell cards are white

* fix rebase
# Conflicts:
#	frontend/src/metabase/admin/performance/components/StrategyEditorForDatabases.tsx

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-31 16:32:28 -06:00
github-automation-metabase
47bc0baffb 🤖 backported "Force loading metadata before queries" (#43374) 2024-05-31 22:22:46 +00:00
github-automation-metabase
1c9efa79e8 🤖 backported "Bump nippy to 3.4.2" (#43449)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-05-31 21:00:36 +00:00
github-automation-metabase
3bee681bf7 🤖 backported "Load metadata before queries" (#43362) 2024-05-31 16:19:37 -04:00
github-automation-metabase
11c3814834 ci(sdk): Autogenerate changelog on build (#43364) (#43452)
* Auto tag embedding team for PR review + dry run npm publish

* Install changelog generation package

* Add the initial changelog

* feat(sdk): This is an empty commit. For testing purposes.

* Update SDk build script to include changelog

* Check if a tag exists

* Ensure changelog is in the released package

* Fix workflow

* Remove unnecessary step

* Ensure we can have access to release utils script when checking out master

* Fix the step to create a PR updating readme and changelog

* Fix changelog generation

* Fix couldn't download changelog

* Clean up steps

Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-05-31 17:21:12 +01:00
github-automation-metabase
fb1a0db3da 🤖 backported "Fix not being able to upload to a table if the uploads database has switched" (#43353)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-05-31 09:40:39 -06:00
github-automation-metabase
580a66ea38 Support string operations on postgres UUIDs (#43417) (#43439)
Fixes #40176.

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-05-31 14:11:21 +00:00
github-automation-metabase
be0607b802 [QP] Drop last stage aggregations for questions in chain filtering (#43274) (#43438)
Models are treated as opaque here, but for a saved question we expose
filters on the query before its final aggregation step.

This drops the aggregation clauses and gets the possible values for the
column of interest.

Fixes #43154.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-05-31 10:02:41 -04:00
github-automation-metabase
419a138775 Improve haveDashboardCardsChanged util permformance (#43422) (#43424)
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-05-30 21:30:18 -05:00
github-automation-metabase
4e6331ea71 🤖 backported "Support stacked bar series labels" (#43415)
* refactor scatter plot to separate code path (#43032)

* refactor scatter plot model to separate function

* (2/3) refactor scatter plot option to separate function (#43033)

* use getScatterPlotOption

* use buildEChartsScatterSeries directly

* remove hoveredSeriesDataKey from scatter

* (3/3) improve chart model types (#43034)

* create WaterfallChartModel type

* create ScatterPlotModel type

* rename BaseCartesianChartModel to CartesianChartModel

* simplify chartModel creation in hook

* support stacked series values labels (#42803)

* drop comment

---------

Co-authored-by: Emmad Usmani <emmadusmani@berkeley.edu>
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
Co-authored-by: Aleksandr Lesnenko <alxnddr@gmail.com>
2024-05-31 00:47:58 +00:00
github-automation-metabase
115f65d902 Multiple Measures Requires Additional Header Row in Pivot Exports (#43322) (#43418)
* Multiple Measures Requires Additional Header Row in Pivot Exports

Mulitple measures can be set in our pivots. We indicate these properly in the fronted with a header row that shows
which measure is reprsented in that particular column.

The header builder fn in the pivot export post processing didn't handle this case, but after this PR, it correctly
adds the final header when necessary.

* Fix up header tests

* Remove comment form; the tests are derived from that work already

Co-authored-by: adam-james <21064735+adam-james-v@users.noreply.github.com>
2024-05-30 16:17:33 -07:00
github-automation-metabase
35829b9fdf fix waterfall chart timezone issues, bar widths (#41671) (#43407)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-05-30 22:07:29 +00:00
github-automation-metabase
81f148cb7f [drivers] Enable :regex feature for MySQL (and MariaDB) (#43269) (#43408)
These databases previously had impoverished support for regular
expressions. The `:regex` driver feature requires advanced,
"Perl-compatible" regular expressions that can do things like lookahead
assertions.

- MySQL supports this from 8.0.4; we recommend 8.0.33+.
- MariaDB supports this from 10.0.5; we recommend 10.4+.

Fixes #43180.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-05-30 17:04:52 -04:00
github-automation-metabase
3a81b61ef3 🤖 backported "Fix duplicate filter panels in fullscreen dashboards" (#43403)
Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-05-30 22:00:04 +01:00
github-automation-metabase
4458203469 [MBQL lib] Add preview-query to truncate a query for Notebook preview (#42836) (#43327)
Fixes #42831.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-05-30 16:12:42 -04:00
github-automation-metabase
910600169b 🤖 backported "Backfill :effective-type for coerced fields" (#43357)
* [Manual backport] Backfill `:effective-type` for coerced fields (#43144) (#43357)

- Update how base type and effective type is added in query-method :mbql/query.
- Base type and effective type is added also during the conversion of query-method :query.
- Adds warning suppression for expressions to places where normalize is
  called something that does not conform schme (eg. ->pMBQL :dispatch-type/map called
  in query-method :query).

---------

Co-authored-by: lbrdnk <lbrdnk@users.noreply.github.com>
2024-05-30 21:55:39 +02:00
github-automation-metabase
5b0e28f0e9 Fix getMappingOptionByTarget perf (#43339) (#43367)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-05-30 15:23:59 -04:00
github-automation-metabase
e0bdb4fb38 🤖 backported "Single metadata endpoint for a dashboard" (#43341)
* Single metadata endpoint for a dashboard (#43283)

* Fix backport

* Backport dependent-metadata changes

* Fix lint

---------

Co-authored-by: Case Nelson <case@metabase.com>
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-05-30 19:21:55 +00:00
github-automation-metabase
d8f129cc16 Prep unit tests for React 18 upgrade (#43375) (#43393)
* pulls out test changes from react 18 / rtl 15 refactor that are comptable with react 17 / rtl 12

* impls pr feedback

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-05-30 13:44:03 -05:00
github-automation-metabase
ccca9ac936 🤖 backported "Keep a single null dimension value" (#43388)
* Keep a single null dimension value

* Add Loki test

* Remove Loki test

* Throw an error if dataset is empty after filtering

* Extract error message into a constant

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-05-30 17:55:23 +00:00
github-automation-metabase
87a48649ce Backport return card type in GET /api/table/card__:id/query_metadata (#43203) (#43333)
Co-authored-by: Tamás Benkő <tamas@metabase.com>
2024-05-30 20:19:40 +03:00
metabase-bot[bot]
3eaa21911c Fix backport conflicts (#43384) 2024-05-30 17:06:57 +00:00
github-automation-metabase
ac7c195724 🤖 backported "Revalidate x-axis scale when graph.dimensions change" (#43376)
Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-05-30 17:57:11 +01:00
github-automation-metabase
6ed2820af1 [WIP] Cloud migration v3 (#43047) (#43351)
* syncs with BE better for using prod/staging store links

* updates init step, fixes tests

* updates start confirmation modal design

* copy changes

* adjusting unit test

* removing unneeded code

* PR feedback, updating tests

---------

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Nick Fitzpatrick <nickfitz.582@gmail.com>
2024-05-30 13:01:19 -03:00
github-automation-metabase
d67eb7e175 🤖 backported "Avoid heavy calculations on dashboard fetching" (#43377)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-05-30 18:59:22 +03:00
metabase-bot[bot]
a17ba08b90 Fix conflicts (#43202) 2024-05-30 18:42:43 +03:00
github-automation-metabase
fb93e5fdbd Leave viz-setting part as is if normalization fails (#43336) (#43372)
Fixes #43089.

Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
2024-05-30 15:23:54 +00:00
github-automation-metabase
6d3599e9cb 🤖 backported "Update expression suggestion design" (#43301)
* Update expression suggestion design (#43232)

* Use sentence case for suggestion headers

* Remove suggestion group dividers

* Highlight suggestions when mousing over them

* Remove unused hoverparent

* Remove custom highlighting for icons

* Allow passing color to metadata info icon

* Make suggestions icons have a consisten color

* Update documentation suggestion style

* Add margin to suggestion sections

* Reorder suggestion sections

* Add test for mouse over highlight on suggestions

* Fix test for suggestion footers

* Remove debugging true

* Rename 'Most used functions/aggregations' to 'Common functions/aggregations'

* Highlight suggestion on mouse move

* Only call onHighlightSuggestion if it is not already highlighted

* Use arrow functions

* Fix test for suggestion highlight

* Add delay to fix broken test

* Use findAllByRole instead of wait

---------

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-05-30 16:44:14 +02:00
github-automation-metabase
5fd82e9f61 🤖 backported "Fix relative/internal links in table viz" (#43363)
* Use internal Link for relative and same-origin URLs

* Update frontend/test/metabase/lib/formatting.unit.spec.js



* Update frontend/test/metabase/lib/formatting.unit.spec.js



---------

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-05-30 15:32:09 +01:00
metabase-bot[bot]
ea924ce6a0 backported "Optimize initial dashboard load - load dashboard metadata in parallel with the query" (#43148) 2024-05-30 14:30:44 +00:00
github-automation-metabase
4332769aa8 cloud migration rc1 (#43082) (#43365)
Co-authored-by: Filipe Silva <filipematossilva@gmail.com>
2024-05-30 10:30:24 -03:00
github-automation-metabase
5023bab92b Do not use MBQL lib for parameter fields in dashboards when possible (#43312) (#43329)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-05-30 09:28:46 -04:00
Jeff Bruemmer
7037fc74f6 docs - update API docs (#42894) 2024-05-30 09:00:39 -04:00
github-automation-metabase
9076679c8b 🤖 backported "Add font fallbacks to charts rendering context" (#43316)
* Use `useBrowserRenderingContext` in most charts

* Add font family fallbacks

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-05-30 13:08:34 +01:00
Raphael Krut-Landau
fae70f8fe1 Manual backport of [Cache] Only show "Adaptive" and "Don't cache" options on OSS page (#43277) 2024-05-29 19:24:18 -04:00
github-automation-metabase
763b4e3e31 fix edit hash is not removed after editing a dashboard (#43213) (#43318)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-05-29 20:42:13 +00:00
metabase-bot[bot]
2f7dfab60f Use table2 icon for questions (#43095) (#43249)
* use table2 icon for questions

* update e2e tests

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-29 18:35:24 +00:00
metabase-bot[bot]
45213b7cdb 🤖 backported "A couple of changes to the sample content" (#43244)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
Co-authored-by: Cal Herries <calherries@gmail.com>
2024-05-29 08:56:16 -06:00
metabase-bot[bot]
5d9ecc3c91 🤖 backported "Fix flaky migration rollback test for mysql: metabase.db.custom-migrations-test/migrate-uploads-settings-test-1" (#43214)
Co-authored-by: Cal Herries <calherries@gmail.com>
2024-05-29 08:46:21 -06:00
metabase-bot[bot]
0b1b1594fb 🤖 backported "entityPicker in technicolor" (#43270)
* entityPicker in technicolor

* more precise import

* add unit test
# Conflicts:
#	frontend/src/metabase/lib/icon.ts

Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-05-29 08:19:46 -06:00
github-automation-metabase
45bc8289f2 Correctly place "Add column" button and allow using it when summarizing (#43189) (#43295)
* Do not render 'Add column' shortcut when viewing a raw table

* Do not show 'Add column' shortcut when a query has aggregations

* List shortcut guards out of component

* Make 'Add column' icon sticky in the header

* Add test for hiding the column shortcut

* Remove Number wrapper

* Move padding to a constant

* Use actions directly to determine if there are any shortcuts

* Make sure there are expressionable columns for the combine columns shortcut

* Make sure there are extractable columns for the extract column shortcut

* Remove padding when not overflowing

* Do not shadow query in popover components

* Allow combine and extract for raw tables

* Add test for combining summarization columns

* Add test for combining summarization columns

* Use a more precise way of calculating the offset for the 'Add column' button

* Handle null question

* Change to the outline button

* Use actual column widths to calculate total width

* Handle empty mode

* Remove extra measure call

* Move shortcutColumn to separate method and avoid looping over all available actions when possible

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-05-29 14:53:23 +02:00
github-automation-metabase
33686b20cf 🤖 backported "Improve models table performance" (#43282)
* improve models table performance

* add loading state for large sets of models

* less icon padding

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-29 05:35:26 -06:00
metabase-bot[bot]
3fc2d0af2d 🤖 backported "Disable offset() in custom columns" (#43227)
* Disable offset in custom columns

* Remove .only

* Update CLJS tests

* Update enterCustomColumnDetails helper and fix offset tests

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-05-29 10:08:56 +00:00
github-automation-metabase
d6dc7166bb support test utilities in sdk import (#43242) (#43287)
Co-authored-by: Phoomparin Mano <poom@metabase.com>
2024-05-29 13:25:06 +07:00
github-automation-metabase
50a5852ad6 use automation user PAT when creating commits in CI workflows (#43250) (#43275)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-05-28 18:44:40 -03:00
metabase-bot[bot]
36a37cb062 Upgrade zx from 7.2.3 to 8.1.0 (#43054) (#43266)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-05-28 20:18:07 +00:00
metabase-bot[bot]
daf5c17809 Fix a couple of flaky tests using with-call-count (#43248) (#43263)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-05-28 20:04:13 +00:00
metabase-bot[bot]
41a87bf9c7 Fix parameter matching with model columns (#43204) (#43257)
Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2024-05-28 19:21:00 +00:00
metabase-bot[bot]
fae914b3c9 docs - app db note (#43239) (#43247)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-05-28 17:16:12 +00:00
metabase-bot[bot]
c05a56e365 Fix rare axis ticks for timeseries axes (#43127) (#43228)
* Fix typos

* Tweak `maxTicksForChartWidth` calculation

* Update Loki screenshots

* Tweak `PIXELS_PER_CHARACTER`

* Update test

Co-authored-by: Anton Kulyk <kuliks.anton@gmail.com>
2024-05-28 16:26:15 +00:00
metabase-bot[bot]
9392b93fc7 Implement graceful error handling for trend charts (#43090) (#43240)
* fix trend charts erroring on latest value being null

* refactor previousRowIndex calculation

* handle errors gracefully

* refactor error messages

* update computeTrend unit tests

* add error handling integration test

* add E2E test to check that errors are gracefully handled

* add integration test to enforce the fix

* fix static viz

* display more meaningful error on static-viz trend charts

* move error handling out of trend chart and fix error handling in Visualization.tsx

* update compute.unit.spec.js

* update SmartScalar.unit.spec.js

* use separate error handler for ErrorBoundary errors in Visualization.jsx

* update E2E test

* update error handling

* update compute.unit.spec.js

* fix react state change error in render function

* show generic error message for ErrorBoundary caught errors

* revert ErrorBoundary changes

* remove generic error border for visualizations

Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-05-28 16:24:11 +00:00
metabase-bot[bot]
77cdfafc0a Allow recent command palette items with the same name (#43098) (#43140)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-28 15:28:07 +00:00
metabase-bot[bot]
862efe7ab0 add 49.12 to list of releases (#43236) (#43237)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-05-28 15:15:14 +00:00
John Swanson
ae6174ada7 Revert "[Feature branch] Make Trash Usable (#42339)" (#43146)
* Revert "[Feature branch] Make Trash Usable (#42339)"

This reverts commit 7460cad859.

* Revert "Update API Changelog (#42864) (#42865)"

This reverts commit dbd6fd711b.
2024-05-28 08:10:28 -07:00
metabase-bot[bot]
30443aaa95 Fix schema error in recent views query (#42844) (#42850)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-05-28 14:17:03 +00:00
metabase-bot[bot]
a94e8e9d97 Fix typo (#43194) (#43217)
Co-authored-by: Mahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
2024-05-28 12:46:40 +00:00
metabase-bot[bot]
4dd5c886c6 🤖 backported "Migrate uploads settings to the db-level behind the scenes, so the uploads DB can be set by the config file" (#43198)
Co-authored-by: Cal Herries <calherries@gmail.com>
2024-05-28 12:24:51 +03:00
metabase-bot[bot]
b6f50ef479 Don't allow executing archived pivot-table cards in a public dashboard (#43206) (#43208)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-05-27 23:35:17 +00:00
metabase-bot[bot]
b0fc5eb6a9 Fix missing React key prop (#43179) (#43188)
* Fix missing React key prop

* Fix missing React key prop

* Fix order of conditions and make the code easier to follow

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-05-27 12:41:51 +00:00
metabase-bot[bot]
fcd4f3b12f [serdes] nested fields should be properly serialized (#43066) (#43176)
Co-authored-by: Alexander Solovyov <alexander@solovyov.net>
2024-05-27 12:18:31 +00:00
metabase-bot[bot]
45867451ea Enable running tagged tests defined in TS (#43172) (#43181)
* Update & tag a test

* Run tests also on TS files

* Update mongo test

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-05-27 19:13:25 +07:00
metabase-bot[bot]
dd71966d66 Restructure parameters e2e tests - separate auto-wiring (#42820) (#43187)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-05-27 12:03:48 +00:00
metabase-bot[bot]
044ae187e3 Fix connection impersonation when jdbc spec is passed (#43147) (#43166)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-05-25 01:44:49 +00:00
metabase-bot[bot]
e0dbfb4f2c Add media query to search button (#43084) (#43142)
* add media query to search button

* useSmallScreen hook

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-05-24 20:32:30 +00:00
metabase-bot[bot]
46036e314b Hide creation buttons on search and recents tabs (#42977) (#43139)
* hide creation buttons on search and recents tabs

* update e2e tests

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-24 19:47:42 +00:00
metabase-bot[bot]
e0cbde4622 bump saml20 - fix azure SLO (#43022) (#43128)
Co-authored-by: bryan <bryan.maass@gmail.com>
2024-05-24 16:59:49 +00:00
metabase-bot[bot]
04e968c573 fix bars width when chart has two y-axes (#43100) (#43126)
Co-authored-by: Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
2024-05-24 16:12:12 +00:00
metabase-bot[bot]
8ded8998b6 [UI] Fix styles for disabled Switch (#43091) (#43105)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-05-24 07:01:41 +00:00
metabase-bot[bot]
fefffa21ad backported "Optimize initial dashboard load" (#43097) 2024-05-24 00:49:18 +00:00
metabase-bot[bot]
20d3681c1b 42592 new modal adding database (#42966) (#43080)
* modal built

* code cleanup, removing unused components

* whitespace shame

* adjusting unit test

* removing px shame

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-05-23 15:23:45 +00:00
metabase-bot[bot]
d8f93e8f1e Fix flaky test send-pulses-exceed-thread-pool-test (#43050) (#43069)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2024-05-23 14:56:13 +00:00
metabase-bot[bot]
01911cb9fc Fix a bunch of small typos (#43055) (#43067)
Co-authored-by: Chris Truter <crisptrutski@users.noreply.github.com>
2024-05-23 14:46:26 +00:00
metabase-bot[bot]
3371af3714 🤖 backported "Rework popular_items to use recent_views and view_count columns" (#43065)
Co-authored-by: Noah Moss <32746338+noahmoss@users.noreply.github.com>
2024-05-23 13:36:44 +00:00
metabase-bot[bot]
923d8ad26c Properly show parent DBs in entity picker recents and search (#43016) (#43062)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-23 12:15:05 +00:00
metabase-bot[bot]
242fc9fb63 Fix - Empty collections shown in Data Picker (#42959) (#43052)
* Generate different shouldShowItem for different pickers

* Add repro for #42957

* Update test to use models instead of metrics

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-05-23 07:58:56 +00:00
metabase-bot[bot]
c6797145bb Drop props spreading to DashboardHeader (#42887) (#43051)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-05-23 07:35:30 +00:00
metabase-bot[bot]
85bd3da7b5 Update link to docs about "No self-service" deprecation (#43038) (#43042)
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-05-22 22:05:47 +00:00
metabase-bot[bot]
c3d46580b9 42934 entity picker create collection root (#43005) (#43036)
* NewCollectionDialog adjustment and unit test

* adding unit test for NewDashboardDialog

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-05-22 21:11:20 +00:00
metabase-bot[bot]
946062caf3 simplify db strategy editor markup (#42986) (#43028)
* simplify strategy editor markup

* make it work for OSS too 😁

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-22 20:24:35 +00:00
metabase-bot[bot]
7a61b4ba67 highlight hovered timeline event (#42969) (#42987)
* highlight hovered timeline event

* add e2e test

* use TIMELINE_EVENT_DATA_NAME constant

* add test case for clicking icon

Co-authored-by: Emmad Usmani <emmadusmani@berkeley.edu>
2024-05-22 16:10:22 +00:00
Denis Berezin
efdf1b8fb4 Backport SDK theming (#43009)
* Restore default styles for subtle button (#42854)

* fix(sdk): Use theme font in charts and tooltips (#42855)

* Allow charts font override in SDK

* Fix default not configured font

(cherry picked from commit 0278b8d221)

* fix(sdk): Various fixes for InteractiveQuestion theming (#42932)

* Fixes for InteractiveQuestion theming

* Update readme

* Fix for unset filter theme color

* Fix unit tests

* Fix unit tests

(cherry picked from commit a3c3193474)

# Conflicts:
#	enterprise/frontend/src/embedding-sdk/lib/theme/embedding-color-palette.ts
#	enterprise/frontend/src/embedding-sdk/lib/theme/get-embedding-theme.ts
#	frontend/src/metabase/ui/utils/colors.ts
2024-05-22 18:58:58 +03:00
metabase-bot[bot]
4441b628dd docs - download diagnostics (#42930) (#43012)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-05-22 15:09:59 +00:00
metabase-bot[bot]
241e2c2e1b Drivers: Update the driver changelog with new features (#43004) (#43007)
These were added in #42602 but I neglected to update the changelog.
Their defaults should serve for most drivers.

Co-authored-by: Braden Shepherdson <braden@metabase.com>
2024-05-22 14:20:44 +00:00
metabase-bot[bot]
c442f6586e Tests for #15131 (#42972) (#42998)
* Tests for #15131

* Appease Kondo

Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2024-05-22 10:07:37 +00:00
metabase-bot[bot]
13e9e77605 Fix - Admin Email does not Display on Question Timeout Page (#42937) (#42967)
* Extract EmailAdmin and add tests for it

* Rename EmailAdmin to AdminEmail

* Remove redundant async

* Add a test case for no email

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
2024-05-22 15:41:41 +07:00
metabase-bot[bot]
f29b81fcd7 Tidy api-changelog.md (#42992) (#42993)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-05-22 02:35:05 +00:00
metabase-bot[bot]
6e0e2fa8d1 CSV uploads: Add test for appending duplicate data (#42918) (#42954)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-05-21 23:47:02 +00:00
metabase-bot[bot]
612b229b38 add snowplow tracking for upsells (#42955) (#42991)
* add snowplow tracking for upsells

* add upsell snowplow test

* appease the linter

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-21 23:33:07 +00:00
metabase-bot[bot]
65006d5a27 Fix overly frequent line series dots (#42735) (#42973)
* hide symbols for charts with too many of them

* update loki

* prevent series dots showing up after manually disabling another series

* update loki snapshots

* refactor conditional

* update loki snapshots

Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-05-21 22:44:03 +00:00
metabase-bot[bot]
e9aff909be feat: Add utm parameters to embedded OSS Metabase footer link (#42968) (#42983)
* Add utm params to  link

* Fix e2e, add url domain

* Fix e2e

Co-authored-by: Denis Berezin <denis.berezin@metabase.com>
2024-05-21 22:18:17 +00:00
metabase-bot[bot]
2672428023 docs - command palette (#42397) (#42981)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-05-21 21:15:22 +00:00
metabase-bot[bot]
5da0c8bed7 changing button height and CP input placeholder (#42770) (#42971)
* changing button height and CP input placeholder

* adjusting search button size

* translate new placeholder

Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-05-21 19:25:19 +00:00
John Swanson
8dfe015d28 Fix report_card.collection_preview in v49 (#42922)
This is a bit painful. I merged this change, but realized we need to
backport the fix to v49. However:

- we don't want to have two versions of the migration (one with a v49
id, one with a v50 id) because then if someone upgrades to 50, then
downgrades to 49, the `rollback` will run and change the type back,
leading to a bug.

- we don't want to push a v51 changeSet ID to v49 or v50, because we
give the user a helpful notice when their database needs a downgrade.
We do this by checking for the latest *executed* migration in the
database and comparing it to the latest migration that Liquibase knows
about, and making sure the executed isn't bigger than the known (e.g.
you can't have executed a v51 migration if it isn't in the local
migration yaml). That would all work fine, except that then we want to
tell you how to downgrade your database, and we use the latest-executed
version for that. So if, for example, someone upgraded from 48 to 49 and
got a v51 changeset, then downgraded back to 48, they would get an error
telling them to run the *v51* jar to roll back their DB.

In this case though, I think it's fine to just move the migration around
to v49, then we can backport it to 49 and 50.
2024-05-21 17:51:41 +00:00
metabase-bot[bot]
498b9686fe fix trend charts spacing (#42860) (#42927)
Co-authored-by: Jesse Devaney <22608765+JesseSDevaney@users.noreply.github.com>
2024-05-21 17:36:39 +00:00
metabase-bot[bot]
242315dcfd Drop props spreading to DashboardSidebars (#42907) (#42941)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-05-21 10:31:00 +00:00
metabase-bot[bot]
255022d25d 🤖 backported "Drop props spreading to DashboardGrid" (#42912)
Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-05-21 12:55:03 +03:00
metabase-bot[bot]
22b178a691 Cover Offset() in custom expressions with e2e tests (#42756) (#42936)
* [MBQL lib] Reject broken uses of `offset` in expressions, filters (#42662)

- Using `offset` in custom expressions is supported only when there is
  an order-by defined on that stage.
- Using `offset` in custom filters is not supported at all, currently.

* Support `Offset()` in custom columns [frontend] (#42326)

* Only nest expressions referenced in breakouts or aggregations

* Support Offset() as expression with no breakouts

* Test fixes 🔧

* Oracle test update

* Improved Oracle test

* Test update 🔧

* Fix busted test

* Add naive support for Offset() in expressions

* Introduce MBQLClauseFunctionReturnType

* Add "window" to MBQLClauseFunctionReturnType and use it for the offset function

* Handle offset type inference

* Remove unused export

* Use "expression" instead of "window" return type
- Rename identifiers in isCompatible
- Make isCompatible accept a clause object instead of just the type
- Handle offset as a special case in isCompatible

* Use any type

* Rename expectedArgumentType to expectedType

* Format code

* Sort types

* Do not suggest offset function in filters

* Fix offset not working in case

* Revert "Do not suggest offset function in filters"

This reverts commit e63790b780.

* Fix order of adjustments

---------




* Disable offsets in filters expressions

* Group existing aggregations-specific tests

* Remove repro for a closed issue

* Use findByText instead of contains

* Add a test for filter expressions

* Add a test for aggregation expressions suggestions

* Disable offsets in filters expressions (#42755)

* Add a test for custom column suggestions

* Add "typing" to enterCustomColumnDetails

* Use enterCustomColumnDetails, improve assertions

* Add more assertions

* Optimize queries

* Add typing for offset expressions

* Add a repro for metabase#42764

* Add a TODO

* Add a TODO

* Add a TODO

* Use NumericLiteral

* Post-merge fixes

* Update test

* Add tests for other custom expressions

* Test drills

* Format code

* Update test name

* Add an assertion

* Add assertions for the preview

* Unskip fixed issue

---------

Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Braden Shepherdson <braden@metabase.com>
Co-authored-by: Cam Saul <github@camsaul.com>
Co-authored-by: Cam Saul <1455846+camsaul@users.noreply.github.com>
2024-05-21 07:27:26 +00:00
metabase-bot[bot]
92119334d1 Split out Search e2e tests and Record Pre-Release Sanity Checks with Replay (#42933) (#42935)
* add replay recordings to sanity check e2e tests during pre-release workflow

* split out search tests from onboarding folder

* parallelize pre-release testing

---------

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Ryan Laurie <iethree@gmail.com>
2024-05-21 00:16:52 +00:00
metabase-bot[bot]
93f1f7d06d Remove flaky / redundant e2e test (#42920) (#42925)
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-05-20 21:01:24 +00:00
metabase-bot[bot]
65c166d51e asserts values match current expectations of values which hopefully solves race conditions that might be happening (#42905) (#42909)
Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-05-20 20:52:03 +00:00
metabase-bot[bot]
a595c048aa small edits (#42923) (#42924)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-05-20 20:19:48 +00:00
metabase-bot[bot]
ec3f807e07 Remove utm from source plan in upsell links (#42890) (#42900)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-20 18:41:56 +00:00
metabase-bot[bot]
54ab920e54 Disable popular items e2e home page test in OSS (#42896) (#42910)
* disables testing for home page popular items in oss

* Update e2e/test/scenarios/onboarding/home/homepage.cy.spec.js



---------

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-20 18:07:00 +00:00
metabase-bot[bot]
fd779bda51 revert embed board (#42911) (#42914)
Co-authored-by: Roman Abdulmanov <roman@metabase.com>
2024-05-20 17:48:21 +00:00
metabase-bot[bot]
193988c6b7 Make Metabot Cool Again (#42797) (#42886)
* Make Metabot Cool Again

* update tests

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-20 17:19:15 +00:00
metabase-bot[bot]
648d77bbf9 Improve db setup tests more (#42899) (#42903)
* improve db setup test

* improve embedding test

Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-20 17:18:43 +00:00
metabase-bot[bot]
344b549f23 Exclude jspdf and html2canvas from the bundle (#42536) (#42872)
* Exclude jspdf and html2canvas from the bundle

* cleanup

Co-authored-by: Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
2024-05-18 10:45:09 +00:00
metabase-bot[bot]
1f7bd1582e Use db argument in driver/database-supports? for uploads (#42851) (#42868)
Co-authored-by: Cal Herries <39073188+calherries@users.noreply.github.com>
2024-05-17 22:41:12 +00:00
metabase-bot[bot]
dbd6fd711b Update API Changelog (#42864) (#42865)
Co-authored-by: John Swanson <john.swanson@metabase.com>
2024-05-17 21:16:25 +00:00
metabase-bot[bot]
2cd167df77 docs - csv upload replace (#42529) (#42863)
Co-authored-by: Jeff Bruemmer <jeff.bruemmer@gmail.com>
2024-05-17 21:01:43 +00:00
metabase-bot[bot]
ad09d79155 fixing e2e flakes in search-snowplow and recently-viewed specs (#42840) (#42843)
Co-authored-by: Nick Fitzpatrick <nick@metabase.com>
2024-05-17 18:35:53 +00:00
metabase-bot[bot]
fa044f03b3 Fix homepage flaky test (#42839) (#42848)
* fixes homepage flaky test

* take 2

* better fix

Co-authored-by: Sloan Sparger <sloansparger@users.noreply.github.com>
2024-05-17 18:34:16 +00:00
metabase-bot[bot]
daa414ef46 Improve db connection setup test (#42838) (#42842)
Co-authored-by: Ryan Laurie <30528226+iethree@users.noreply.github.com>
2024-05-17 18:05:21 +00:00
metabase-bot[bot]
710943cfff Remove GoogleAnalytics specific logic from the FE (#42827) (#42837)
Co-authored-by: Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
2024-05-17 17:10:58 +00:00
metabase-bot[bot]
b6c6367915 Scroll to created column when extracting or combining columns in chill mode (#42650) (#42832)
* Set scrollToLastColumn ui control from column extract action

* Scroll to last column when the uiControl is set

* Scroll to last column when combining a column

* Scroll to last column when combining a column via the + shortcut

* Scroll to last column when extracting a column via the + shortcut

* Remove all references to settingsSyncOptions

* Check that the column is added at the end

* Disable scrollToLastColumn once used

* Add test that verifies scrollToLastColumn ui control has been reset

Co-authored-by: Romeo Van Snick <romeo@romeovansnick.be>
2024-05-17 15:07:00 +00:00
4810 changed files with 507293 additions and 222318 deletions

View File

@@ -107,6 +107,7 @@
malli.core/explainer {:message "Use metabase.util.malli.registry/explainer instead of malli.core/explainer"}
me.flowthing.pp/pprint {:message "Use metabase.util.log instead of me.flowthing.pp/pprint"}
medley.core/random-uuid {:message "Use clojure.core/random-uuid instead of medley.core/random-uuid"}
metabase.driver/database-supports? {:message "Use metabase.driver.util/supports? instead of metabase.driver/database-supports?"}
metabase.lib.equality/find-column-indexes-for-refs {:message "Use lib.equality/closest-matches-in-metadata or lib.equality/find-closest-matches-for-refs instead of lib.equality/find-column-indexes-for-refs"}
metabase.test/with-temp* {:message "Use mt/with-temp instead of mt/with-temp*"}
toucan2.tools.with-temp {:message "Use mt/with-temp instead of t2.with-temp/with-temp"}}
@@ -114,6 +115,7 @@
:discouraged-namespace
{camel-snake-kebab.core {:message "CSK is not Turkish-safe, use the versions in metabase.util instead."}
clojure.tools.logging {:message "Use metabase.util.log instead of clojure.tools.logging directly"}
grouper.core {:message "Use metabase.util.grouper instead of grouper.core"}
honeysql.core {:message "Use Honey SQL 2. Honey SQL 1 is removed as a dependency in Metabase 49+."}
honeysql.format {:message "Use Honey SQL 2. Honey SQL 1 is removed as a dependency in Metabase 49+."}
honeysql.helpers {:message "Use Honey SQL 2. Honey SQL 1 is removed as a dependency in Metabase 49+."}
@@ -135,7 +137,7 @@
;; namespace(s). This is mostly a temporary placeholder until we go in and create module namespaces, which means
;; you should go create one.
;;
;; 2. A set of namespace symbols. All namespaces in other modules will only be allowed ;; to use namespaces from
;; 2. A set of namespace symbols. All namespaces in other modules will only be allowed to use namespaces from
;; this set. Ideally this set should only have one namespace, but restricting it to a set of several is still
;; better than `:any`.
;;
@@ -162,6 +164,7 @@
metabase.async #{metabase.async.streaming-response
metabase.async.streaming-response.thread-pool
metabase.async.util} ; TODO -- consolidate these into a real API namespace.
metabase.audit #{metabase.audit}
metabase.bootstrap #{metabase.bootstrap}
metabase.cmd #{} ; there are no namespaces here since you shouldn't be using this in any other module.
metabase.config #{metabase.config}
@@ -266,6 +269,8 @@
metabase.analyze :any
metabase.api :any
metabase.async :any
metabase.audit :any
metabase.auth-provider #{metabase.util}
metabase.bootstrap #{}
metabase.cmd :any
metabase.config #{metabase.plugins}
@@ -284,7 +289,12 @@
metabase.metabot :any
metabase.models :any
metabase.moderation :any
metabase.native-query-analyzer :any
metabase.native-query-analyzer #{metabase.config
metabase.driver
metabase.lib
metabase.public-settings
metabase.query-processor
metabase.util}
metabase.permissions :any
metabase.plugins :any
metabase.public-settings :any
@@ -434,10 +444,6 @@
metabase.driver.druid.js druid.js
metabase.driver.druid.query-processor druid.qp
metabase.driver.druid.sync druid.sync
metabase.driver.googleanalytics.client ga.client
metabase.driver.googleanalytics.execute ga.execute
metabase.driver.googleanalytics.metadata ga.metadata
metabase.driver.googleanalytics.query-processor ga.qp
metabase.driver.impl driver.impl
metabase.driver.mongo.execute mongo.execute
metabase.driver.mongo.parameters mongo.params
@@ -576,6 +582,7 @@
metabase.util.encryption encryption
metabase.util.encryption-test encryption-test
metabase.util.files u.files
metabase.util.grouper grouper
metabase.util.honey-sql-2 h2x
metabase.util.i18n i18n
metabase.util.i18n.impl i18n.impl
@@ -602,7 +609,9 @@
toucan.models models}}}
:lint-as
{clojure.core.logic/defne clj-kondo.lint-as/def-catch-all
{cljs.cache/defcache clojure.core/deftype
clojure.core.cache/defcache clojure.core/deftype
clojure.core.logic/defne clj-kondo.lint-as/def-catch-all
clojure.test.check.clojure-test/defspec clojure.test/deftest
clojurewerkz.quartzite.jobs/defjob clojure.core/defn
honeysql.helpers/defhelper clj-kondo.lint-as/def-catch-all
@@ -654,6 +663,7 @@
metabase.test/with-temp-empty-app-db clojure.core/let
metabase.test/with-temp-file clojure.core/let
metabase.test/with-user-in-groups clojure.core/let
metabase.test/with-grouper-batches! clojure.core/fn
metabase.upload-test/with-upload-table! clojure.core/let
metabase.util.files/with-open-path-to-resource clojure.core/let
metabase.util.malli.defn/defn schema.core/defn
@@ -693,6 +703,7 @@
metabase.api.card-test/with-temp-native-card! hooks.common/with-two-bindings
metabase.api.card-test/with-temp-native-card-with-params! hooks.common/with-two-bindings
metabase.api.collection-test/with-french-user-and-personal-collection hooks.common/with-two-top-level-bindings
metabase.api.common.internal-test/with-jetty-server hooks.common/with-one-binding
metabase.api.dashboard-test/with-chain-filter-fixtures hooks.common/let-one-with-optional-value
metabase.api.dashboard-test/with-simple-dashboard-with-tabs hooks.common/with-one-binding
metabase.api.card-test/with-card-param-values-fixtures hooks.common/let-one-with-optional-value
@@ -785,8 +796,10 @@
clojurewerkz.quartzite.schedule.simple/schedule macros.quartz/simple-schedule
clojurewerkz.quartzite.triggers/build macros.quartz/build-trigger
metabase-enterprise.sandbox.test-util/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase-enterprise.sandbox.test-util/with-gtaps-for-user! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase-enterprise.serialization.test-util/with-world macros.metabase-enterprise.serialization.test-util/with-world
metabase-enterprise.test/with-gtaps! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase-enterprise.test/with-gtaps-for-user! macros.metabase-enterprise.sandbox.test-util/with-gtaps!
metabase-enterprise.advanced-permissions.api.util-test/with-impersonations! macros.metabase-enterprise.advanced-permissions.api.util-test/with-impersonations!
metabase.api.card-test/with-ordered-items macros.metabase.api.card-test/with-ordered-items
metabase.api.collection-test/with-collection-hierarchy macros.metabase.api.collection-test/with-collection-hierarchy
@@ -845,7 +858,11 @@
;; `metabase.driver.*`, excluding `-test` namespaces.
;;
{:pattern "metabase(?:(?:(?:-enterprise\\.sandbox)?\\.query-processor\\.)|(?:\\.driver\\.)).*(?<!-test)$"
:name qp-and-driver-source-namespaces}]
:name qp-and-driver-source-namespaces}
;; driver namespaces
{:pattern "metabase\\.driver.*$"
:name driver-namespaces}]
:config-in-ns
{test-namespaces
@@ -853,7 +870,9 @@
{:inline-def {:level :off}
:missing-docstring {:level :off}
:private-call {:level :off}
:metabase/defsetting-must-specify-export {:level :off}}
:metabase/defsetting-must-specify-export {:level :off}
:discouraged-var {metabase.driver/database-supports? {:level :off}}}
:hooks
{:analyze-call
{clojure.core/defmacro hooks.clojure.core/non-thread-safe-form-should-end-with-exclamation
@@ -903,6 +922,11 @@
toucan.util.test {:message "Don't use application database inside MLv2 code"}
toucan2.core {:message "Don't use application database inside MLv2 code"}}}}
driver-namespaces
{:linters
{:discouraged-var
{metabase.driver/database-supports? {:level :off}}}}
qp-and-driver-source-namespaces
{:linters
{:discouraged-namespace

View File

@@ -162,7 +162,6 @@
token-status
toucan-name
uncached-setting
uploads-table-prefix
user-visibility
version
version-info

View File

@@ -11,6 +11,10 @@
[]
(not-empty (set (keys (:clj (hooks/ns-analysis 'metabase.test.data.dataset-definitions))))))
(defn- local-def?
[ns* sexpr]
(= ns* (:ns (hooks/resolve {:name sexpr}))))
(defn- dataset-type
"`dataset` can be one of:
@@ -21,7 +25,7 @@
We can only determine if an unqualified symbol refers to something in the dataset definitions namespace if there are
cached results available from [[global-dataset-symbols]]."
[dataset]
[this-ns dataset]
(let [sexpr (hooks/sexpr dataset)
global-defs (global-dataset-symbols)]
(cond
@@ -31,20 +35,19 @@
(namespace sexpr)
:qualified
(empty? global-defs)
:unqualified/unknown
(contains? global-defs sexpr)
:unqualified/from-dataset-defs-namespace
;; either something defined in the current namespace or let-bound in the current scope.
(local-def? this-ns sexpr)
:unqualified/local-def
:else
:unqualified/local-def)))
:unqualified/unknown)))
(defn dataset
[{{[_ dataset & body] :children} :node}]
[{{[_ dataset & body] :children} :node this-ns :ns}]
(let [noop (constantly nil)
body (case (dataset-type dataset)
body (case (dataset-type this-ns dataset)
;; non-symbol, qualified symbols, and unqualified symbols from the current namespace/let-bound can all
;; get converted from something like
;;

View File

@@ -1,31 +1,339 @@
;; https://github.com/weavejester/cljfmt/blob/master/cljfmt/resources/cljfmt/indents/clojure.clj
{:extra-indents
{auto-parse [[:inner 0]]
cond-> [[:inner 0]]
check [[:inner 0]]
deferred-tru [[:inner 0]]
defprotocol+ [[:block 1] [:inner 1]]
potemkin/defprotocol+ [[:block 1] [:inner 1]]
let-404 [[:block 1]]
metabase.legacy-mbql.util/match-one [[:inner 0]]
merge-with [[:inner 0]]
metabase.test/dataset [[:inner 0]]
metabase.test/formatted-rows [[:inner 0]]
metabase.test/mbql-query [[:inner 0]]
metabase.test/test-drivers [[:inner 0]]
metabase.test/with-temporary-setting-values [[:block 1]]
;; If we just treat these as functions we can ignore this, despite some files not being consistent
;metabase.models.permissions/set-has-full-permissions-for-set? [[:inner 0]]
;metabase.models.permissions/set-has-full-permissions? [[:inner 0]]
;metabase.models.permissions/set-has-partial-permissions? [[:inner 0]]
metabase.models.permissions/set-has-partial-permissions-for-set? [[:inner 0]]
publish-event! [[:block 1]]
metabase.query-processor.streaming/streaming-response [[:inner 0]]
metabase.util/prog1 [[:inner 0]]
metabase.util/select-keys-when [[:inner 0]]
;; This supports a lot of existing formatting, but these are functions so the
;; existing formatting is probably wrong.
;toucan2.core/select [[:inner 0]]
;toucan2.core/update! [[:inner 0]]
}
:sort-ns-references? true}
;; Cljfmt config. See https://github.com/weavejester/cljfmt#formatting-options
{:sort-ns-references?
true
:function-arguments-indentation
:community
:parallel?
true
:paths
["src"
"test"
"enterprise/backend"
"bin/build"
"modules/drivers"
#_"dev"]
;; See https://github.com/weavejester/cljfmt/blob/master/cljfmt/resources/cljfmt/indents/clojure.clj for the default
;; definitions
;;
;; [[:block 0]]
;; ^ number of special args
;;
;; `:block` indentation means format with all arguments indented 2 spaces except for the 'special' arguments which
;; normally are supposed to go on the first line. e.g. `let` gets [[:block 1]] because it has one 'special' arg.
;;
;; [[:inner 0]]
;; ^ depth
;; [[:inner 2 0]]
;; ^ argument index to restrict this rule to
;;
;; `:inner` indentation is like `:defn` indentation. `[[:inner 0]]` (default for `defn`) means all arguments at depth
;; zero get indented 2 spaces if not on the first line regardless of number of elements on the first line.
:extra-indents
{;; clojure.core stuff
fn* [[:inner 0]]
let* [[:block 1]]
with-meta [[:default]]
;; library stuff. Libraries that specify their own `:style/indent` specs are included in the section after this
;; since it is generated automatically.
clojure.core.logic/fresh [[:block 1]]
clojure.core.logic/matcha [[:block 1]]
clojure.core.logic/run [[:block 2]]
clojure.core.match/match [[:block 1]]
clojure.test.check.properties/for-all [[:block 1]]
clojure.test.check.properties/for-all* [[:block 1]]
clojure.test.check/quick-check [[:block 1]]
clojure.tools.macro/macrolet [[:block 1] [:inner 2 0]]
clojurewerkz.quartzite.jobs/build [[:default]]
clojurewerkz.quartzite.jobs/with-description [[:default]]
clojurewerkz.quartzite.jobs/with-identity [[:default]]
clojurewerkz.quartzite.schedule.cron/schedule [[:default]]
clojurewerkz.quartzite.schedule.cron/with-misfire-handling-instruction-do-nothing [[:default]]
clojurewerkz.quartzite.triggers/build [[:default]]
clojurewerkz.quartzite.triggers/with-description [[:default]]
clojurewerkz.quartzite.triggers/with-identity [[:default]]
clojurewerkz.quartzite.triggers/with-priority [[:default]]
clojurewerkz.quartzite.triggers/with-schedule [[:default]]
def-map-type [[:block 2] [:inner 1]]
defprotocol+ [[:block 1] [:inner 1]]
defrecord+ [[:block 2] [:inner 1]]
deftype+ [[:block 2] [:inner 1]]
net.cgrand.macrovich/case [[:block 0]]
potemkin.namespaces/import-vars [[:default]]
potemkin.types/def-map-type [[:block 2] [:inner 1]]
potemkin.types/defprotocol+ [[:block 1] [:inner 1]]
potemkin.types/defrecord+ [[:block 2] [:inner 1]]
potemkin.types/deftype+ [[:block 2] [:inner 1]]
potemkin/def-map-type [[:block 2] [:inner 1]]
potemkin/defprotocol+ [[:block 1] [:inner 1]]
potemkin/defrecord+ [[:block 2] [:inner 1]]
potemkin/deftype+ [[:block 2] [:inner 1]]
potemkin/import-vars [[:default]]
taoensso.nippy/extend-freeze [[:inner 0]]
taoensso.nippy/extend-thaw [[:inner 0]]
throttle.core/with-throttling [[:block 1]]
;; the rest of the stuff in this list is generated automatically based on `:style/indent` specs
;; by running [[dev.generate-cljfmt-config/specs]]... use that code to update this list
metabase-enterprise.advanced-permissions.api.util-test/with-impersonations! [[:inner 0]]
metabase-enterprise.cache.config-test/with-temp-persist-models [[:block 1]]
metabase-enterprise.sandbox.test-util/with-gtaps! [[:inner 0]]
metabase-enterprise.sandbox.test-util/with-gtaps-for-user! [[:inner 0]]
metabase-enterprise.sandbox.test-util/with-user-attributes [[:block 2]]
metabase-enterprise.serialization.test-util/with-dbs [[:inner 0]]
metabase-enterprise.serialization.test-util/with-random-dump-dir [[:block 1]]
metabase-enterprise.serialization.test-util/with-world [[:block 0]]
metabase-enterprise.sso.integrations.jwt-test/with-users-with-email-deleted [[:block 1]]
metabase-enterprise.test/with-gtaps! [[:inner 0]]
metabase-enterprise.test/with-gtaps-for-user! [[:inner 0]]
metabase-enterprise.test/with-user-attributes [[:block 2]]
metabase.actions-test/with-actions-test-data-and-actions-permissively-enabled [[:block 0]]
metabase.actions.test-util/with-actions [[:block 1]]
metabase.actions.test-util/with-actions-disabled [[:block 0]]
metabase.actions.test-util/with-actions-enabled [[:block 0]]
metabase.actions.test-util/with-actions-test-data [[:inner 0]]
metabase.actions.test-util/with-actions-test-data-and-actions-enabled [[:block 0]]
metabase.actions.test-util/with-actions-test-data-tables [[:block 1]]
metabase.actions.test-util/with-empty-db [[:inner 0]]
metabase.actions.test-util/with-temp-test-data [[:inner 0]]
metabase.api.alert-test/with-alert-in-collection [[:block 1]]
metabase.api.card-test/with-cards-in-readable-collection [[:block 1]]
metabase.api.card-test/with-cards-in-writeable-collection [[:block 1]]
metabase.api.card-test/with-ordered-items [[:inner 0]]
metabase.api.card-test/with-temp-native-card! [[:block 1]]
metabase.api.card-test/with-temp-native-card-with-params! [[:block 1]]
metabase.api.collection-test/with-collection-hierarchy [[:block 1]]
metabase.api.collection-test/with-french-user-and-personal-collection [[:block 2]]
metabase.api.collection-test/with-some-children-of-collection [[:block 1]]
metabase.api.common/check [[:default]]
metabase.api.common/define-routes [[:block 0]]
metabase.api.common/let-404 [[:block 1]]
metabase.api.common.internal/auto-coerce [[:block 1]]
metabase.api.common.internal/auto-parse [[:block 1]]
metabase.api.common.internal-test/no-route-regexes [[:block 0]]
metabase.api.embed-test/do-response-formats [[:block 1]]
metabase.api.embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]
metabase.api.embed-test/with-embedding-enabled-and-temp-card-referencing [[:block 3]]
metabase.api.embed-test/with-embedding-enabled-and-temp-dashcard-referencing [[:block 3]]
metabase.api.embed-test/with-new-secret-key [[:block 0]]
metabase.api.embed-test/with-temp-card [[:block 1]]
metabase.api.embed-test/with-temp-dashcard [[:block 1]]
metabase.api.preview-embed-test/with-embedding-enabled-and-new-secret-key [[:block 0]]
metabase.api.preview-embed-test/with-new-secret-key [[:block 0]]
metabase.api.public-test/with-sharing-enabled-and-temp-card-referencing [[:block 3]]
metabase.api.public-test/with-sharing-enabled-and-temp-dashcard-referencing [[:block 3]]
metabase.api.public-test/with-temp-public-card [[:block 1]]
metabase.api.public-test/with-temp-public-dashboard [[:block 1]]
metabase.api.public-test/with-temp-public-dashboard-and-card [[:block 1]]
metabase.api.search-test/do-test-users [[:block 1]]
metabase.api.session/http-401-on-error [[:block 0]]
metabase.async.streaming-response/streaming-response [[:block 2]]
metabase.async.streaming-response-test/with-streaming-response-thread-pool [[:block 0]]
metabase.async.streaming-response-test/with-test-driver-db! [[:block 0]]
metabase.async.util/cancelable-thread [[:block 0]]
metabase.cmd.copy/step [[:block 1]]
metabase.cmd.copy/with-connection-rollback-only [[:block 1]]
metabase.cmd.copy/with-disabled-db-constraints [[:block 2]]
metabase.config/build-type-case [[:block 0]]
metabase.dashboard-subscription-test/with-link-card-fixture-for-dashboard [[:block 2]]
metabase.db.liquibase/with-liquibase [[:block 1]]
metabase.db.liquibase/with-scope-locked [[:block 1]]
metabase.db.schema-migrations-test.impl/test-migrations [[:block 2]]
metabase.db/with-application-db [[:inner 0]]
metabase.driver.bigquery-cloud-sdk.query-processor/with-temporal-type [[:default]]
metabase.driver.druid.client/DELETE [[:default]]
metabase.driver.druid.client/GET [[:default]]
metabase.driver.druid.client/POST [[:default]]
metabase.driver.druid.query-processor-test/druid-query [[:block 0]]
metabase.driver.druid.query-processor-test/druid-query-returning-rows [[:block 0]]
metabase.driver.mongo.query-processor/mongo-let [[:block 1]]
metabase.driver.sql-jdbc.actions/with-jdbc-transaction [[:block 1]]
metabase.driver.sql-jdbc.connection/with-connection-spec-for-testing-connection [[:block 1]]
metabase.driver.sql-jdbc.execute.diagnostic/capturing-diagnostic-info [[:block 1]]
metabase.driver.sql.query-processor/apply-top-level-clause [[:default]]
metabase.driver/with-driver [[:block 1]]
metabase.lib.binning/with-binning [[:default]]
metabase.lib.core/with-binning [[:default]]
metabase.lib.core/with-join-alias [[:default]]
metabase.lib.core/with-join-conditions [[:default]]
metabase.lib.join/with-join-alias [[:default]]
metabase.lib.join/with-join-conditions [[:default]]
metabase.lib.test-util.macros/$ids [[:inner 0]]
metabase.lib.test-util.macros/mbql-query [[:inner 0]]
metabase.lib.util.match/match [[:inner 0]]
metabase.lib.util.match/match-one [[:inner 0]]
metabase.lib.util.match/replace [[:inner 0]]
metabase.lib.util.match/replace-in [[:inner 0]]
metabase.models.collection-test/with-collection-hierarchy [[:block 1]]
metabase.models.collection-test/with-current-user-perms-for-collections [[:block 1]]
metabase.models.collection-test/with-personal-and-impersonal-collections [[:block 1]]
metabase.models.dashboard-test/with-dash-in-collection [[:inner 0]]
metabase.models.interface/define-batched-hydration-method [[:inner 0]]
metabase.models.interface/define-simple-hydration-method [[:inner 0]]
metabase.models.params.chain-filter-test/with-clean-field-values-for-field [[:block 1]]
metabase.models.params.chain-filter-test/with-fk-field-to-field-remapping [[:block 0]]
metabase.models.params.chain-filter-test/with-human-readable-values-remapping [[:block 0]]
metabase.models.pulse-test/with-dashboard-subscription-in-collection [[:block 1]]
metabase.models.pulse-test/with-pulse-in-collection [[:inner 0]]
metabase.models.setting/defsetting [[:block 1]]
metabase.models.setting.multi-setting/define-multi-setting [[:inner 0]]
metabase.models.task-history/with-task-history [[:block 1]]
metabase.query-processor-test.pipeline-queries-test/pmbql-query [[:block 1]]
metabase.query-processor-test.pipeline-queries-test/run-pmbql-query [[:block 1]]
metabase.query-processor.debug/debug> [[:block 0]]
metabase.query-processor.error-type/deferror [[:block 1]]
metabase.query-processor.middleware.cache-backend.interface/with-cached-results [[:block 4]]
metabase.query-processor.middleware.process-userland-query-test/with-query-execution [[:block 1]]
metabase.query-processor.store/cached [[:block 1]]
metabase.query-processor.store/with-metadata-provider [[:inner 0]]
metabase.query-processor.streaming/streaming-response [[:block 1]]
metabase.query-processor.test-util/format-rows-by [[:default]]
metabase.sample-data-test/with-temp-sample-database-db [[:block 1]]
metabase.server.middleware.session/as-admin [[:block 0]]
metabase.server.middleware.session/with-current-user [[:inner 0]]
metabase.shared.util.i18n/trs [[:default]]
metabase.shared.util.i18n/trsn [[:default]]
metabase.shared.util.i18n/tru [[:default]]
metabase.shared.util.i18n/trun [[:default]]
metabase.shared.util.namespaces/import-fns [[:default]]
metabase.sync.fetch-metadata/log-if-error [[:block 1]]
metabase.sync.sync-metadata.fields-test/with-test-db [[:block 0]]
metabase.sync.util/do-with-start-and-finish-debug-logging [[:default]]
metabase.sync.util/sum-for [[:block 1]]
metabase.sync.util/sync-operation [[:block 3]]
metabase.sync.util/with-db-logging-disabled [[:default]]
metabase.sync.util/with-duplicate-ops-prevented [[:default]]
metabase.sync.util/with-emoji-progress-bar [[:block 1]]
metabase.sync.util/with-error-handling [[:block 1]]
metabase.sync.util/with-start-and-finish-logging [[:default]]
metabase.sync.util/with-start-and-finish-logging* [[:default]]
metabase.sync.util/with-sync-events [[:default]]
metabase.test/$ids [[:inner 0]]
metabase.test/as-admin [[:inner 0]]
metabase.test/dataset [[:inner 0]]
metabase.test/discard-setting-changes [[:block 1]]
metabase.test/format-rows-by [[:default]]
metabase.test/let-url [[:block 1]]
metabase.test/mbql-query [[:inner 0]]
metabase.test/native-query [[:block 0]]
metabase.test/query [[:block 1]]
metabase.test/run-mbql-query [[:inner 0]]
metabase.test/test-driver [[:inner 0]]
metabase.test/test-drivers [[:inner 0]]
metabase.test/test-helpers-set-global-values! [[:block 0]]
metabase.test/throw-if-called! [[:block 1]]
metabase.test/with-actions [[:block 1]]
metabase.test/with-actions-disabled [[:block 0]]
metabase.test/with-actions-enabled [[:block 0]]
metabase.test/with-actions-test-data [[:inner 0]]
metabase.test/with-actions-test-data-and-actions-enabled [[:block 0]]
metabase.test/with-actions-test-data-tables [[:block 1]]
metabase.test/with-additional-premium-features [[:block 1]]
metabase.test/with-current-user [[:inner 0]]
metabase.test/with-driver [[:block 1]]
metabase.test/with-empty-db [[:inner 0]]
metabase.test/with-empty-h2-app-db [[:block 0]]
metabase.test/with-metadata-provider [[:inner 0]]
metabase.test/with-premium-features [[:block 1]]
metabase.test/with-temp [[:inner 0]]
metabase.test/with-temp-copy-of-db [[:block 0]]
metabase.test/with-temp-scheduler [[:block 0]]
metabase.test/with-temp-test-data [[:inner 0]]
metabase.test/with-temp-vals-in-db [[:block 3]]
metabase.test/with-test-user [[:inner 0]]
metabase.test/with-user-in-groups [[:inner 0]]
metabase.test.data/$ids [[:inner 0]]
metabase.test.data/dataset [[:inner 0]]
metabase.test.data/mbql-query [[:inner 0]]
metabase.test.data/native-query [[:block 0]]
metabase.test.data/query [[:block 1]]
metabase.test.data/run-mbql-query [[:inner 0]]
metabase.test.data/with-empty-h2-app-db [[:block 0]]
metabase.test.data/with-temp-copy-of-db [[:block 0]]
metabase.test.data.datasets/test-driver [[:inner 0]]
metabase.test.data.datasets/test-drivers [[:inner 0]]
metabase.test.data.one-off-dbs/with-blank-db [[:block 0]]
metabase.test.data.one-off-dbs/with-blueberries-db [[:block 0]]
metabase.test.data.users/with-test-user [[:inner 0]]
metabase.test.util/discard-setting-changes [[:block 1]]
metabase.test.util/let-url [[:block 1]]
metabase.test.util/throw-if-called! [[:block 1]]
metabase.test.util/with-temp-scheduler [[:block 0]]
metabase.test.util/with-temp-vals-in-db [[:block 3]]
metabase.test.util/with-user-in-groups [[:inner 0]]
metabase.test.util.public-settings/with-additional-premium-features [[:block 1]]
metabase.test.util.public-settings/with-premium-features [[:block 1]]
metabase.test.util.thread-local/test-helpers-set-global-values! [[:block 0]]
metabase.timeseries-query-processor-test.util/test-timeseries-drivers [[:block 0]]
metabase.timeseries-query-processor-test/run-mbql-query [[:inner 0]]
metabase.upload-test/with-upload-table! [[:inner 0]]
metabase.upload.types/with-currency [[:default]]
metabase.upload.types/with-parens [[:default]]
metabase.util/auto-retry [[:block 1]]
metabase.util/ignore-exceptions [[:block 0]]
metabase.util/or-with [[:block 1]]
metabase.util/profile [[:block 1]]
metabase.util/prog1 [[:inner 0]]
metabase.util/varargs [[:inner 0]]
metabase.util/with-us-locale [[:block 0]]
metabase.util.date-2/with-time-zone-same-instant [[:default]]
metabase.util.encryption-test/with-secret-key [[:block 1]]
metabase.util.honey-sql-2/with-database-type-info [[:default]]
metabase.util.i18n/deferred-trs [[:default]]
metabase.util.i18n/deferred-tru [[:default]]
metabase.util.i18n/trs [[:default]]
metabase.util.i18n/tru [[:default]]
metabase.util.jvm/auto-retry [[:block 1]]
metabase.util.jvm/varargs [[:block 1]]
metabase.util.jvm/with-us-locale [[:block 0]]
metabase.util.malli/disable-enforcement [[:block 0]]
metabase.util.malli/with [[:default]]
metabase.util.malli/with-api-error-message [[:default]]
metabuild-common.core/exit-when-finished-nonzero-on-exception [[:block 0]]
metabuild-common.core/step [[:block 1]]
metabuild-common.entrypoint/exit-when-finished-nonzero-on-exception [[:block 0]]
metabuild-common.steps/step [[:block 1]]
methodical.core/defmethod [[:inner 0]]
methodical.core/defmulti [[:inner 0]]
methodical.core/with-dispatcher [[:default]]
methodical.core/with-method-table [[:default]]
methodical.core/with-prefers [[:default]]
methodical.interface/with-dispatcher [[:default]]
methodical.interface/with-method-table [[:default]]
methodical.interface/with-prefers [[:default]]
methodical.macros/defmethod [[:inner 0]]
methodical.macros/defmulti [[:inner 0]]
saml20-clj.sp.response/validate-confirmation-datas [[:block 1]]
toucan2.connection/with-transaction [[:block 1]]
toucan2.core/build [[:block 0]]
toucan2.core/compile [[:block 0]]
toucan2.core/debug [[:block 0]]
toucan2.core/define-after-insert [[:inner 0]]
toucan2.core/define-after-select [[:inner 0]]
toucan2.core/define-after-update [[:inner 0]]
toucan2.core/define-before-delete [[:inner 0]]
toucan2.core/define-before-insert [[:inner 0]]
toucan2.core/define-before-select [[:inner 0]]
toucan2.core/define-default-fields [[:inner 0]]
toucan2.core/define-named-query [[:block 1]]
toucan2.core/deftransforms [[:block 1]]
toucan2.core/with-transaction [[:block 1]]
toucan2.tools.after/define-after-impl [[:default]]
toucan2.tools.after-insert/define-after-insert [[:inner 0]]
toucan2.tools.after-select/define-after-select [[:inner 0]]
toucan2.tools.after-update/define-after-update [[:inner 0]]
toucan2.tools.before-delete/define-before-delete [[:inner 0]]
toucan2.tools.before-insert/define-before-insert [[:inner 0]]
toucan2.tools.before-select/define-before-select [[:inner 0]]
toucan2.tools.compile/build [[:block 0]]
toucan2.tools.compile/compile [[:block 0]]
toucan2.tools.compile/resolved [[:block 0]]
toucan2.tools.debug/debug [[:block 0]]
toucan2.tools.default-fields/define-default-fields [[:inner 0]]
toucan2.tools.named-query/define-named-query [[:block 1]]
toucan2.tools.simple-out-transform/define-out-transform [[:inner 0]]
toucan2.tools.transformed/deftransforms [[:block 1]]
toucan2.tools.with-temp/with-temp [[:inner 0]]
toucan2.util/try-with-error-context [[:inner 0]]}}

View File

@@ -62,6 +62,13 @@ module.exports = {
warnOnUnassignedImports: false,
},
],
"sort-imports": [
"error",
{
// allows this rule to work with import/order
ignoreDeclarationSort: true,
},
],
"no-console": [2, { allow: ["warn", "error", "errorBuffer"] }],
"react/no-is-mounted": 2,
"react/prefer-es6-class": 2,
@@ -81,6 +88,7 @@ module.exports = {
{ additionalHooks: "(useSyncedQueryString|useSafeAsyncFunction)" },
],
"prefer-const": [1, { destructuring: "all" }],
"no-restricted-globals": ["error", "close"],
"no-useless-escape": 0,
"no-only-tests/no-only-tests": [
"error",

2
.github/CODEOWNERS vendored
View File

@@ -10,5 +10,7 @@ enterprise/backend/src/metabase_enterprise/audit_app @noahmoss
enterprise/backend/src/metabase_enterprise/sso @noahmoss
enterprise/backend/src/metabase_enterprise/task/truncate_audit_table.clj @noahmoss
enterprise/backend/src/metabase_enterprise/internal_user.clj @noahmoss
frontend/src/metabase/ui @metabase/core-frontend-admin-webapp
src/metabase/**/*permissions* @noahmoss
src/metabase/integrations @noahmoss
snowplow/* @metabase/data

View File

@@ -36,6 +36,7 @@ runs:
["dashboard-filters", {} ],
["embedding", {} ],
["filters", {} ],
["filters-reproductions", {}],
["joins", {} ],
["models", {} ],
["native", {} ],
@@ -44,6 +45,8 @@ runs:
["organization", {} ],
["permissions", {} ],
["question", {} ],
["question-reproductions", {} ],
["search", {}],
["sharing", {} ],
["visualizations-charts", {} ],
["visualizations-tabular", {} ],

View File

@@ -1,12 +1,20 @@
name: Prepare cypress environment
description: Cypress preparation steps
outputs:
chrome-path:
description: Path to the custom Chrome executable
value: ${{ steps.setup-chrome.outputs.chrome-path }}
runs:
using: "composite"
steps:
- name: Install Replay.io browser
run: npx @replayio/cypress install
shell: bash
- name: Install Chrome v111
uses: browser-actions/setup-chrome@v1
with:
# https://chromium.cypress.io/linux/stable/111.0.5563.146
chrome-version: 1097615
id: setup-chrome
- name: Check to see if dependencies should be cached
if: ${{ contains(github.event.head_commit.message, '[ci nocache]') }}

View File

@@ -1,10 +1,15 @@
name: Prepare front-end environment
inputs:
node-version:
description: "The version of Node.js to use, overriding .nvmrc"
required: false
runs:
using: "composite"
steps:
- name: Prepare Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }} # this overrides, if present
node-version-file: ".nvmrc"
- name: Check to see if dependencies should be cached
if: ${{ contains(github.event.head_commit.message, '[ci nocache]') }}
@@ -23,6 +28,6 @@ runs:
if: ${{ !contains(github.event.head_commit.message, '[ci nocache]') }}
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock') }}
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/yarn.lock', '**/patches/*.patch') }}
- run: yarn install --frozen-lockfile --prefer-offline
shell: bash

View File

@@ -2,7 +2,7 @@ name: Test database driver
inputs:
junit-name:
required: true
default: 'driver'
default: "driver"
test-args:
required: false
@@ -14,7 +14,7 @@ runs:
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: driver-${{ inputs.junit-name }}
m2-cache-key: driver
- name: Build static viz frontend
run: yarn build-static-viz
shell: bash
@@ -25,7 +25,7 @@ runs:
uses: dorny/test-reporter@v1
if: failure()
with:
path: 'target/junit/**/*_test.xml'
path: "target/junit/**/*_test.xml"
name: JUnit Test Report ${{ inputs.junit-name }}
reporter: java-junit
list-suites: failed

17
.github/auto_request_review.yml vendored Normal file
View File

@@ -0,0 +1,17 @@
# The reviewers configuration for the auto_request_review workflow
# See https://github.com/necojackarc/auto-request-review/tree/master?tab=readme-ov-file#reviewers-configuration
# for the spec
files:
# migrations related files
'resources/migrations/**':
- team:core-backend-components
'src/metabase/db/custom_migrations.clj':
- team:core-backend-components
options:
ignore_draft: true
ignored_keywords:
- DO NOT REVIEW
- WIP
enable_group_assignment: false

View File

@@ -43,6 +43,11 @@ frontend_all: &frontend_all
- *frontend_sources
- *frontend_specs
frontend_loki_ci: &frontend_loki_ci
- ".github/workflows/loki.yml"
- ".loki/**"
- ".storybook/**"
backend_ci: &backend_ci
- ".github/actions/prepare-frontend/**"
- ".github/actions/prepare-backend/**"
@@ -53,6 +58,7 @@ backend_ci: &backend_ci
backend_presto_kerberos:
- "**/presto_jdbc/**"
- "**/presto_jdbc.clj"
- ".github/workflows/presto-kerberos-integration-test.yml"
backend_sources: &backend_sources
- *shared_sources
@@ -71,6 +77,7 @@ backend_specs: &backend_specs
- "modules/drivers/*/test/**"
- "test_config/**"
- "dev/**"
- "test_resources/**"
backend_all: &backend_all
- *default

1
.github/team.json vendored
View File

@@ -14,6 +14,7 @@
{
"name": "Embedding",
"label": ".Team/Embedding",
"projectUrl": "https://github.com/orgs/metabase/projects/88/views/1",
"members": ["WiNloSt", "deniskaber", "oisincoveney", "npretto", "heypoom"]
},
{

View File

@@ -11,11 +11,7 @@ jobs:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: tibdex/github-app-token@v2.1.0
id: generate-token
with:
app_id: ${{ secrets.METABASE_BOT_APP_ID }}
private_key: ${{ secrets.METABASE_BOT_APP_PRIVATE_KEY }}
token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- uses: ./.github/actions/find-squashed-commit
name: Find commit
id: find_commit
@@ -82,7 +78,7 @@ jobs:
TARGET_BRANCH: ${{ steps.get_latest_release_branch.outputs.branch-name }}
ORIGINAL_PULL_REQUEST_NUMBER: ${{ github.event.pull_request.number }}
ORIGINAL_TITLE: ${{ github.event.pull_request.title }}
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
GITHUB_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
COMMIT: ${{ steps.find_commit.outputs.commit }}
- name: Auto approve backport PR
@@ -96,7 +92,7 @@ jobs:
if: ${{ steps.create_backport_pull_request.outputs.has-conflicts == 'false' }}
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ steps.generate-token.outputs.token }}
token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
pull-request-number: ${{ steps.create_backport_pull_request.outputs.backport_pr_number }}
merge-method: squash

View File

@@ -0,0 +1,21 @@
# Config is in .github/auto_request_review.yml
name: Auto Request Review
on:
pull_request:
types: [opened, ready_for_review, reopened, synchronize]
jobs:
auto-request-review:
# Don't run on forked repos
if: ${{ !github.event.pull_request.head.repo.fork }}
permissions:
contents: read
pull-requests: write
name: Auto Request Review
runs-on: ubuntu-latest
steps:
- name: Request review based on files changes and/or groups the author belongs to
uses: necojackarc/auto-request-review@v0.13.0
with:
token: '${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}'

View File

@@ -1,80 +1,41 @@
name: Milestone Reminder
name: Automatically set milestone
run-name: Set milestone for ${{ github.event.head_commit.message }}
on:
pull_request:
types: [closed]
push:
branches:
- "master"
- release-x.**
jobs:
milestone-reminder:
if: github.event.pull_request.merged == true
name: Remind to set milestone
set-milestone:
name: Automatically set milestone
runs-on: ubuntu-22.04
timeout-minutes: 5
permissions:
pull-requests: write
issues: read
issues: write
contents: read
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
ref: master # we want the logic from master, even though we're triggering on a release branch
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- uses: actions/github-script@v7
with:
script: | # js
const { setMilestoneForCommits } = require('${{ github.workspace }}/release/dist/index.cjs');
const owner = context.repo.owner;
const repo = context.repo.repo;
const pullNumber = '${{ github.event.pull_request.number }}';
const branchName = `${{ github.ref }}`;
const commitMessage = context?.payload?.head_commit?.message ?? '';
// the github API doesn't expose linked issues, so we have to parse the body ourselves
function getLinkedIssueId(pull) {
// https://regexr.com/7sk94
const match = pull.data.body.match(/(close(s|d)?|fixe?(s|d)?|resolve(s|d)?) (#|https?:\/\/github.com\/.+\/issues\/)(\d+)/i);
return match && match?.[2];
}
function getMilestone(pullOrIssue) {
// pull has pull.data.milestone, issue has issue.milestone
return pullOrIssue?.data?.milestone || pullOrIssue?.milestone;
}
const pull = await github.rest.pulls.get({
await setMilestoneForCommits({
github,
owner,
repo,
pull_number: pullNumber,
});
if (getMilestone(pull)) {
console.log("Pull request has milestone", pull.data.milestone?.title);
process.exit(0);
}
const issueId = getLinkedIssueId(pull);
if (issueId) {
console.log('linked issue found', issueId);
const issue = await github.rest.issues.get({
owner,
repo,
issue_number: issueId,
});
const milestone = getMilestone(issue);
if (milestone) {
console.log("Linked issue has milestone", milestone.title);
process.exit(0);
}
}
console.log("No milestone found");
const author = pull.data.user.login;
const guideLink = "https://www.notion.so/metabase/Metabase-Branching-Strategy-6eb577d5f61142aa960a626d6bbdfeb3?pvs=4#3dea255ffa3b4f74942a227844e889fa";
const message = `@${author} Did you forget to add a milestone to the issue for this PR? _[When and where should I add a milestone?](${guideLink})_`;
await github.rest.issues.createComment({
owner,
repo,
issue_number: pullNumber,
body: message,
branchName,
commitMessages: [commitMessage],
});

View File

@@ -0,0 +1,57 @@
name: Conventional commit PR Title Reminder
on:
pull_request:
branches:
- master
paths:
- enterprise/frontend/src/embedding-sdk/**
jobs:
pr-title-reminder:
runs-on: ubuntu-22.04
timeout-minutes: 5
permissions:
pull-requests: write
steps:
- name: Check if the PR title is already following Conventional Commits style
uses: actions/github-script@v7
id: is-conventional-commit
with:
result-encoding: string
script: | # js
const pullRequestTitle = context.payload.pull_request.title
const conventionalCommitRegex = /^(?<type>\w+)\((?<scope>\w+)\):/
const match = pullRequestTitle.match(conventionalCommitRegex)
if (match) {
const { type, scope } = match.groups
return ['feat', 'fix', 'perf', 'docs', 'style', 'refactor', 'test', 'build', 'ci'].includes(type) && scope === 'sdk'
}
- name: Checkout repository so `gh` CLI works
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Remind PR authors to use conventional commit in the title
if: ${{ steps.is-conventional-commit.outputs.result != 'true' }}
run: |
comment='@${{ github.event.pull_request.user.login }} You have modified embedding SDK code. Please make sure the PR title follows [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) style.
Here are all the supported types that will be shown in the changelog:
- `feat`
- `fix`
- `perf`
These types `docs`, `style`, `refactor`, `test`, `build`, and `ci` are also encouraged for non-changelog related tasks.
Please also make sure to include `sdk` scope, otherwise, the changelog will not include this task.
For example, these are valid PR titles:
- `feat(sdk): Add interactive dashboard component`
- `feat(sdk): Support theming pie chart`
- `fix(sdk): Fix static dashboard crash`'
gh pr comment -b "$comment" --edit-last || gh pr comment -b "$comment"
env:
GH_TOKEN: ${{ github.token }}

View File

@@ -21,7 +21,6 @@ on:
- Athena
- BigQuery
- Druid
- Google Analytics
- Google Classpath Test
- Maria DB
- Maria DB (latest)
@@ -109,42 +108,6 @@ jobs:
junit-name: 'be-tests-druid-ee'
test-args: ":only ${{ inputs.test }} :times ${{ inputs.times }}"
be-tests-googleanalytics-ee:
if: inputs.driver == 'Google Analytics'
runs-on: ubuntu-22.04
timeout-minutes: 90
env:
CI: 'true'
DRIVERS: googleanalytics
steps:
- uses: actions/checkout@v4
- name: Test Google Analytics driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-googleanalytics-ee'
test-args: ":only ${{ inputs.test }} :times ${{ inputs.times }}"
be-google-related-drivers-classpath-test:
if: inputs.driver == 'Google Classpath Test'
runs-on: ubuntu-22.04
timeout-minutes: 90
env:
CI: 'true'
DRIVERS: 'googleanalytics,bigquery-cloud-sdk'
MB_BIGQUERY_TEST_PROJECT_ID: ${{ secrets.BIGQUERY_TEST_PROJECT_ID }}
MB_BIGQUERY_TEST_CLIENT_ID: ${{ secrets.MB_BIGQUERY_TEST_CLIENT_ID }}
MB_BIGQUERY_TEST_CLIENT_SECRET: ${{ secrets.MB_BIGQUERY_TEST_CLIENT_SECRET }}
MB_BIGQUERY_TEST_ACCESS_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_ACCESS_TOKEN }}
MB_BIGQUERY_TEST_REFRESH_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_REFRESH_TOKEN }}
MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON: ${{ secrets.MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON }}
steps:
- uses: actions/checkout@v4
- name: Test Google Related Drivers Classpath
uses: ./.github/actions/test-driver
with:
junit-name: 'be-google-related-drivers-classpath-test'
test-args: ':only "[metabase.query-processor-test.expressions-test metabase.driver.google-test metabase.driver.googleanalytics-test ${{ inputs.test }}] :times ${{ inputs.times }}"'
be-tests-mariadb-10-2-ee:
if: inputs.driver == 'Maria DB'
runs-on: ubuntu-22.04

View File

@@ -40,6 +40,9 @@ jobs:
MB_ATHENA_TEST_ACCESS_KEY: ${{ secrets.MB_ATHENA_TEST_ACCESS_KEY }}
MB_ATHENA_TEST_SECRET_KEY: ${{ secrets.MB_ATHENA_TEST_SECRET_KEY }}
MB_ATHENA_TEST_S3_STAGING_DIR: ${{ secrets.MB_ATHENA_TEST_S3_STAGING_DIR }}
# These credentials are used to test the driver when the user does not have the athena:GetTableMetadata permission
MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_ACCESS_KEY: ${{ secrets.MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_ACCESS_KEY }}
MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_SECRET_KEY: ${{ secrets.MB_ATHENA_TEST_WITHOUT_GET_TABLE_METADATA_SECRET_KEY }}
steps:
- uses: actions/checkout@v4
- name: Test Athena driver
@@ -160,66 +163,6 @@ jobs:
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-googleanalytics-ee:
needs: files-changed
if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true'
runs-on: ubuntu-22.04
timeout-minutes: 90
env:
CI: 'true'
DRIVERS: googleanalytics
steps:
- uses: actions/checkout@v4
- name: Test Google Analytics driver
uses: ./.github/actions/test-driver
with:
junit-name: 'be-tests-googleanalytics-ee'
test-args: ":exclude-tags '[:mb/once]'"
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
bucket: ${{ vars.AWS_S3_TEST_RESULTS_BUCKET }}
aws-access-key-id: ${{ secrets.AWS_TEST_RESULTS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-google-related-drivers-classpath-test:
needs: files-changed
if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true'
runs-on: ubuntu-22.04
timeout-minutes: 90
env:
CI: 'true'
DRIVERS: 'googleanalytics,bigquery-cloud-sdk'
MB_BIGQUERY_TEST_PROJECT_ID: ${{ secrets.BIGQUERY_TEST_PROJECT_ID }}
MB_BIGQUERY_TEST_CLIENT_ID: ${{ secrets.MB_BIGQUERY_TEST_CLIENT_ID }}
MB_BIGQUERY_TEST_CLIENT_SECRET: ${{ secrets.MB_BIGQUERY_TEST_CLIENT_SECRET }}
MB_BIGQUERY_TEST_ACCESS_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_ACCESS_TOKEN }}
MB_BIGQUERY_TEST_REFRESH_TOKEN: ${{ secrets.MB_BIGQUERY_TEST_REFRESH_TOKEN }}
MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON: ${{ secrets.MB_BIGQUERY_CLOUD_SDK_TEST_SERVICE_ACCOUNT_JSON }}
steps:
- uses: actions/checkout@v4
- name: Test Google Related Drivers Classpath
uses: ./.github/actions/test-driver
with:
junit-name: 'be-google-related-drivers-classpath-test'
test-args: ':only "[metabase.query-processor-test.expressions-test metabase.driver.google-test metabase.driver.googleanalytics-test]"'
- name: Upload Test Results
uses: ./.github/actions/upload-test-results
if: always()
with:
input-path: ./target/junit/
output-name: ${{ github.job }}
bucket: ${{ vars.AWS_S3_TEST_RESULTS_BUCKET }}
aws-access-key-id: ${{ secrets.AWS_TEST_RESULTS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TEST_RESULTS_SECRET_ACCESS_KEY }}
aws-region: ${{ vars.AWS_REGION }}
trunk-api-token: ${{ secrets.TRUNK_API_TOKEN }}
be-tests-mariadb-10-2-ee:
needs: files-changed
if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true'
@@ -866,6 +809,11 @@ jobs:
MB_SNOWFLAKE_TEST_WAREHOUSE: ${{ secrets.MB_SNOWFLAKE_TEST_WAREHOUSE }}
MB_SNOWFLAKE_TEST_PK_USER: METABASE PK
MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY: ${{ secrets.MB_SNOWFLAKE_TEST_PK_PRIVATE_KEY }}
# RSA Role testing:
MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_DEFAULT_USER: RSA_ROLE_TEST_DEFAULT_USER
MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_CUSTOM_USER: RSA_ROLE_TEST_CUSTOM_USER
MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_ROLE: RSA_ROLE_TEST_ROLE
MB_SNOWFLAKE_TEST_RSA_ROLE_TEST_DB: RSA_ROLE_TEST_DB
steps:
- uses: actions/checkout@v4
- name: Test Snowflake driver
@@ -947,7 +895,7 @@ jobs:
be-tests-sqlserver-2017-ee:
needs: files-changed
if: github.event.pull_request.draft == false && needs.files-changed.outputs.backend_all == 'true'
runs-on: ubuntu-22.04
runs-on: ubuntu-20.04
timeout-minutes: 90
env:
CI: 'true'

View File

@@ -52,11 +52,12 @@ jobs:
- name: Wait for Metabase to start on port 3000
run: while ! curl -s 'http://localhost:3000/api/health' | grep '{"status":"ok"}'; do sleep 1; done
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Run Cypress on the source
run: |
yarn cypress run \
--browser chrome \
--browser ${{ steps.cypress-prep.outputs.chrome-path }} \
--config-file e2e/test/scenarios/cross-version/source/shared/cross-version-source.config.js \
--spec e2e/test/scenarios/cross-version/source/**/*.cy.spec.js
- name: Stop Metabase ${{ matrix.version.source }}
@@ -84,7 +85,7 @@ jobs:
- name: Run Cypress on the target
run: |
yarn cypress run \
--browser chrome \
--browser ${{ steps.cypress-prep.outputs.chrome-path }} \
--config-file e2e/test/scenarios/cross-version/target/shared/cross-version-target.config.js \
--spec e2e/test/scenarios/cross-version/target/**/*.cy.spec.js
- name: Upload Cypress Artifacts upon failure

View File

@@ -46,7 +46,6 @@ jobs:
DISPLAY: ""
QA_DB_ENABLED: true
CYPRESS_QA_DB_MONGO: true
CYPRESS_REPLAYIO_ENABLED: 1
CYPRESS_ALL_FEATURES_TOKEN: ${{ secrets.ENTERPRISE_TOKEN }}
CYPRESS_NO_FEATURES_TOKEN: ${{ secrets.E2E_STARTER_TOKEN }}
MB_SNOWPLOW_AVAILABLE: true
@@ -84,6 +83,7 @@ jobs:
java-version: 11
distribution: "temurin"
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Run Snowplow micro
uses: ./.github/actions/run-snowplow-micro
@@ -96,7 +96,7 @@ jobs:
--spec '${{ github.event.inputs.spec }}' \
--env burn=${{ github.event.inputs.burn_in }},grep='${{ github.event.inputs.grep }}' \
--config-file e2e/support/cypress-stress-test.config.js \
--browser 'replay-chromium'
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4

View File

@@ -39,8 +39,39 @@ jobs:
id: e2e-matrix
uses: ./.github/actions/build-e2e-matrix
# if this is a test on a release branch, we need to check the build requirements
get-build-requirements:
if: |
!cancelled() &&
contains(github.ref, 'release-x')
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
java_version: ${{ fromJson(steps.dependencies.outputs.result).java_version }}
node_version: ${{ fromJson(steps.dependencies.outputs.result).node_version }}
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get build dependencies
uses: actions/github-script@v7
id: dependencies
with:
script: | # js
const { getBuildRequirements, getVersionFromReleaseBranch } = require('${{ github.workspace }}/release/dist/index.cjs');
const version = getVersionFromReleaseBranch('${{ github.ref }}');
const requirements = getBuildRequirements(version);
return {
java_version: requirements.java,
node_version: requirements.node,
};
build:
needs: [files-changed, e2e-matrix-builder]
needs: [files-changed, e2e-matrix-builder, get-build-requirements]
if: |
!cancelled() &&
github.event.pull_request.draft == false &&
@@ -54,14 +85,19 @@ jobs:
env:
MB_EDITION: ${{ matrix.edition }}
INTERACTIVE: false
# make sure that builds on release branches get licenses, because we use them for releases
SKIP_LICENSES: ${{ github.event_name == 'pull_request' }}
steps:
- uses: actions/checkout@v4
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
with:
node-version: '${{ needs.get-build-requirements.outputs.node_version }}'
- name: Prepare back-end environment
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: e2e-tests
java-version: '${{ needs.get-build-requirements.outputs.java_version || 11 }}'
- name: Build uberjar with ./bin/build.sh
run: ./bin/build.sh
@@ -90,11 +126,6 @@ jobs:
COMMIT_INFO_MESSAGE: ${{ github.event.pull_request.title || github.event.head_commit.message || github.even.head.sha }}
MB_SNOWPLOW_AVAILABLE: true
MB_SNOWPLOW_URL: "http://localhost:9090" # Snowplow micro
CYPRESS_REPLAYIO_ENABLED: 1
CYPRESS_REPLAYIO_ENABLE_UPLOAD: 1
RECORD_REPLAY_METADATA_FILE: /tmp/replay-metadata.json
RECORD_REPLAY_METADATA_TEST_RUN_ID: ${{ github.run_id }}
REPLAY_API_KEY: ${{ secrets.REPLAY_IO_TOKEN }}
TZ: US/Pacific # to make node match the instance tz
strategy:
fail-fast: false
@@ -134,6 +165,7 @@ jobs:
distribution: "temurin"
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Run Snowplow micro
@@ -144,24 +176,24 @@ jobs:
run: |
yarn run test-cypress-run \
--env grepTags=@OSS,grepOmitFiltered=true \
--spec './e2e/test/scenarios/**/*.cy.spec.js' \
--browser 'replay-chromium'
--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' \
--browser 'replay-chromium'
--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' \
--browser 'replay-chromium'
--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'
@@ -169,15 +201,15 @@ jobs:
yarn run test-cypress-run \
--env grepTags="-@slow+-@mongo+-@flaky --@quarantine",grepOmitFiltered=true \
--folder ${{ matrix.name }} \
--browser 'replay-chromium'
--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' \
--browser 'replay-chromium'
--spec './e2e/test/scenarios/**/*.cy.spec.(js|ts)' \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
env:
CYPRESS_QA_DB_MONGO: true

View File

@@ -4,15 +4,15 @@ on:
workflow_dispatch:
inputs:
spec:
description: 'Relative path of the target spec'
description: "Relative path of the target spec"
type: string
required: true
burn_in:
description: 'Number of times to run the test (e.g. 20)'
description: "Number of times to run the test (e.g. 20)"
type: string
required: true
grep:
description: 'Grep and filter tests to run in isolation'
description: "Grep and filter tests to run in isolation"
type: string
required: false
@@ -45,10 +45,12 @@ jobs:
uses: ./.github/actions/prepare-backend
with:
m2-cache-key: "cljs"
- name: Build cljs
run: yarn build:cljs
- name: Stress-test ${{ github.event.inputs.spec }} ${{ github.event.inputs.burn_in }} times
run: |
for i in {1..${{ github.event.inputs.burn_in }}}; do
yarn test-unit \
yarn jest --runInBand --ci --silent --no-cache \
--testPathPattern '${{ github.event.inputs.spec }}' \
--testNamePattern '${{ github.event.inputs.grep }}'
if [[ "$?" != 0 ]]; then

View File

@@ -12,6 +12,7 @@ jobs:
- name: Checkout Repository
uses: actions/checkout@v3
with:
token: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
ref: ${{ github.head_ref }}
- name: Prepare frontend environment
@@ -26,7 +27,9 @@ jobs:
run: yarn build-pure:cljs
- name: Build Storybook
run: yarn build-storybook
# We won't be able to use Storybook play's `userEvent` with production build
# see https://github.com/storybookjs/storybook/issues/19758
run: NODE_ENV=development yarn build-storybook
- name: Serve Storybook
run: yarn http-server storybook-static -p 6006 &
@@ -44,25 +47,19 @@ jobs:
- name: Update Loki Snapshots
run: yarn test-visual:loki-update
- uses: tibdex/github-app-token@v2.1.0
id: generate-token
with:
app_id: ${{ secrets.METABASE_BOT_APP_ID }}
private_key: ${{ secrets.METABASE_BOT_APP_PRIVATE_KEY }}
- name: Commit and Push Changes
run: |
git config --global user.name "Metabase bot"
git config --global user.email "metabase-bot@metabase.com"
git config --global user.name "Metabase Automation"
git config --global user.email "github-automation@metabase.com"
git add .loki/**
git commit -m "Update Loki Snapshots"
git push
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
GITHUB_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: Remove 'loki-update' label
uses: actions/github-script@v3
with:
github-token: ${{secrets.GITHUB_TOKEN}}
github-token: ${{secrets.METABASE_AUTOMATION_USER_TOKEN}}
script: |
github.issues.removeLabel({
issue_number: context.issue.number,

View File

@@ -3,7 +3,26 @@ name: Loki Visual Regression Testing
on: [pull_request]
jobs:
files-changed:
name: Check which files changed
runs-on: ubuntu-22.04
timeout-minutes: 3
outputs:
frontend_ci: ${{ steps.changes.outputs.frontend_ci }}
frontend_sources: ${{ steps.changes.outputs.frontend_sources }}
frontend_loki_ci: ${{ steps.changes.outputs.frontend_loki_ci }}
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
visual-test:
needs: files-changed
if: needs.files-changed.outputs.frontend_ci == 'true' || needs.files-changed.outputs.frontend_sources == 'true' || needs.files-changed.outputs.frontend_loki_ci == 'true'
runs-on: ubuntu-latest
services:
docker:

View File

@@ -110,7 +110,7 @@ jobs:
run-sanity-check:
runs-on: ubuntu-22.04
timeout-minutes: 30
needs: [release-artifact, check-uberjar-health]
needs: [release-artifact]
strategy:
matrix:
edition: [oss, ee]
@@ -147,6 +147,7 @@ jobs:
java-version: 11
distribution: "temurin"
- name: Prepare Cypress environment
id: cypress-prep
uses: ./.github/actions/prepare-cypress
- name: Run Snowplow micro
uses: ./.github/actions/run-snowplow-micro
@@ -161,7 +162,10 @@ jobs:
- name: Run a few important Cypress tests as sanity check
run: |
mkdir -p ./target/uberjar && cp metabase.jar ./target/uberjar/metabase.jar
yarn test-cypress-run --folder onboarding
yarn test-cypress-run \
--env grepTags="@smoke",grepOmitFiltered=true \
--spec './e2e/test/scenarios/**/*.cy.spec.(js|ts)' \
--browser ${{ steps.cypress-prep.outputs.chrome-path }}
- name: Upload Cypress Artifacts upon failure
uses: actions/upload-artifact@v4
@@ -174,7 +178,7 @@ jobs:
if-no-files-found: ignore
containerize:
needs: [release-artifact, run-sanity-check]
needs: [release-artifact]
runs-on: ubuntu-22.04
timeout-minutes: 15
strategy:

View File

@@ -1,3 +1,8 @@
# this file uses MBA https://github.com/metabase/mba to spin up a Metabase
# instance then runs the test script in the MBA instance sharing the same
# network to interact with presto container
# TODO: get rid of MBA and use actions/prepare-backend instead
name: Kerberized Presto Integration Test
on:
@@ -5,10 +10,10 @@ on:
push:
branches:
- master
- 'release**'
- 'feature**'
- "release**"
- "feature**"
tags:
- '**'
- "**"
jobs:
files-changed:
@@ -52,7 +57,7 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
path: presto-kerberos-docker
- name: Bring up Presto+Kerberos cluster
run: cd presto-kerberos-docker && docker-compose up -d && cd ..
run: cd presto-kerberos-docker && docker compose up -d && cd ..
- name: Run Presto test query from command line (sanity check)
run: cd presto-kerberos-docker && ./test.sh && cd ..
# Since we are managing the Docker containers from the GitHub action container, we need to copy all the
@@ -63,6 +68,7 @@ jobs:
run: docker cp presto-kerberos:/etc/krb5.conf resources
- name: Copy client.keytab file to resources
run: docker cp presto-kerberos:/home/presto/client.keytab resources
- name: Checkout mba
uses: actions/checkout@v4
with:
@@ -74,11 +80,30 @@ jobs:
run: ls -latr mba-src
- name: Symlink mba
run: cd mba-src && sudo ln -s $(pwd)/src/main.clj /usr/local/bin/mba && chmod +x /usr/local/bin/mba && cd ..
- name: Ensure mba
run: which mba
- name: Run Metabase via MBA
run: /home/runner/work/metabase/metabase/mba-src/src/main.clj --mb . --data-db postgres-data -n example.com up
run: mba --mb . --data-db postgres-data -n example.com compose config > mba-compose.yml
- name: Adjust generated docker-compose config
uses: actions/github-script@v7
with:
script: | #js
const fs = require("fs");
const config = fs.readFileSync("mba-compose.yml", "utf8");
const newConfig = config.replace(
/name:\s+example.com/,
"name: example.com\n external: true",
);
fs.writeFileSync("mba-compose.yml", newConfig);
- name: Print compose config
run: cat mba-compose.yml
- name: Run mba
run: docker compose -f mba-compose.yml up -d
- name: Run test script in MBA instance
run: >
mba --mb . --data-db postgres-data -n example.com \
run .github/scripts/run-presto-kerberos-integration-test.sh
run: docker compose -f mba-compose.yml exec metabase .github/scripts/run-presto-kerberos-integration-test.sh

View File

@@ -9,7 +9,7 @@ on:
type: string
required: true
git_ref:
description: 'Valid git reference e.g. branches, tags, hashes'
description: 'A git commit hash that will be used to build the SDK'
type: string
required: true
@@ -20,7 +20,7 @@ concurrency:
cancel-in-progress: true
jobs:
git-tag:
check-git-tag:
runs-on: ubuntu-22.04
timeout-minutes: 20
env:
@@ -30,25 +30,21 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
fetch-depth: 0
fetch-tags: true
- name: Setup git user
- name: check tags
run: |
git config --global user.email "metabase-bot@metabase.com"
git config --global user.name "Metabase bot"
- name: Create a new git tag
run: |
git tag ${{ env.tag }}
- name: Push the new tag
id : push-tag
run: |
git push origin ${{ env.tag }}
- if: ${{ failure() && steps.push-tag.outcome == 'failure' }}
run: echo "Tag '${{ env.tag }}' already exists. If you expect to run this workflow with the same tag, please remove the tag first and rerun this workflow again."
if [ $(git tag -l | grep $tag$) ]
then
echo "::error::Tag '${{ env.tag }}' already exists. If you expect to run this workflow with the same tag, please remove the tag first and rerun this workflow again."
exit 1
else
exit 0
fi
test:
needs: git-tag
needs: check-git-tag
runs-on: ubuntu-22.04
timeout-minutes: 20
steps:
@@ -77,6 +73,8 @@ jobs:
uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
fetch-depth: 0
fetch-tags: true
- name: Prepare front-end environment
uses: ./.github/actions/prepare-frontend
@@ -86,9 +84,17 @@ jobs:
with:
m2-cache-key: "release-sdk"
- name: Update readme
run: |
./bin/embedding-sdk/release_utils.bash update_readme ${{ inputs.sdk_version }}
- name: Bump published npm package version
run: |
sed -i -E 's/("version": ").*"/\1${{ inputs.sdk_version }}"/' enterprise/frontend/src/embedding-sdk/package.template.json
./bin/embedding-sdk/release_utils.bash update_package_json_template ${{ inputs.sdk_version }}
- name: Update changelog
run: |
yarn embedding-sdk:generate-changelog -o changelog-diff
- name: Build SDK bundle
run: yarn run build-embedding-sdk
@@ -102,6 +108,12 @@ jobs:
name: metabase-sdk
path: ./resources/embedding-sdk
- name: Upload changelog diff
uses: actions/upload-artifact@v4
with:
name: sdk-changelog-diff
path: ./changelog-diff
build-jar:
needs: test
uses: ./.github/workflows/uberjar-sdk.yml
@@ -136,7 +148,6 @@ jobs:
run: |
aws s3 cp $FILE s3://$BUCKET/$BUCKET_PATH
publish-npm:
needs: [build-sdk, upload-jar]
runs-on: ubuntu-22.04
@@ -150,25 +161,28 @@ jobs:
- name: Setup git user
run: |
git config --global user.email "metabase-bot@metabase.com"
git config --global user.name "Metabase bot"
git config --global user.email "github-automation@metabase.com"
git config --global user.name "Metabase Automation"
- name: Update readme
run: |
sed -i -E 's|(embedding-sdk-)[0-9.]+|\1${{ inputs.sdk_version }}|' enterprise/frontend/src/embedding-sdk/README.md
sed -i -E 's|(http://downloads.metabase.com/sdk/v)[0-9.]+|\1${{ inputs.sdk_version }}|' enterprise/frontend/src/embedding-sdk/README.md
bash ./bin/embedding-sdk/release_utils.bash update_readme ${{ inputs.sdk_version }}
- name: Bump published npm package version
run: |
sed -i -E 's/("version": ").*"/\1${{ inputs.sdk_version }}"/' enterprise/frontend/src/embedding-sdk/package.template.json
bash ./bin/embedding-sdk/release_utils.bash update_package_json_template ${{ inputs.sdk_version }}
- uses: actions/create-github-app-token@v1
id: app-token
- name: Retrieve SDK changelog diff
uses: actions/download-artifact@v4
with:
app-id: ${{ secrets.METABASE_BOT_APP_ID }}
private-key: ${{ secrets.METABASE_BOT_APP_PRIVATE_KEY }}
name: sdk-changelog-diff
- name: Create a PR updating readme + published version
- name: Update changelog
run: |
cat changelog-diff enterprise/frontend/src/embedding-sdk/CHANGELOG.md > new-changelog
mv new-changelog enterprise/frontend/src/embedding-sdk/CHANGELOG.md
- name: Create a PR updating readme + published version, and changelog (using GitHub Metabase Automation account)
run: |
git checkout -b update-sdk-version-${{ inputs.sdk_version }}
git commit -a -m 'Update Readme version references and published npm version to ${{ inputs.sdk_version }}'
@@ -177,9 +191,33 @@ jobs:
--assignee "${GITHUB_ACTOR}"\
--title "Update SDK version to ${{ inputs.sdk_version }}"\
--body "Update Readme version references and published npm package version to ${{ inputs.sdk_version }}"
env:
GH_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ secrets.METABASE_BOT_APP_ID }}
private-key: ${{ secrets.METABASE_BOT_APP_PRIVATE_KEY }}
- name: Edit PR adding useful information (using Metabase bot app)
run: |
gh pr edit --add-reviewer @metabase/embedding --add-label no-backport
env:
GH_TOKEN: ${{ steps.app-token.outputs.token }}
- name: Auto approve PR (using GitHub Actions account)
run: |
gh pr review --approve
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable Pull request auto-merge (using GitHub Metabase Automation account)
run: |
gh pr merge --auto --squash
env:
GH_TOKEN: ${{ secrets.METABASE_AUTOMATION_USER_TOKEN }}
- name: Retrieve build SDK package artifact
uses: actions/download-artifact@v4
with:
@@ -191,3 +229,25 @@ jobs:
cd sdk
echo //registry.npmjs.org/:_authToken=${{ secrets.NPM_RELEASE_TOKEN }} > .npmrc
npm publish
git-tag:
needs: publish-npm
runs-on: ubuntu-22.04
timeout-minutes: 20
env:
tag: embedding-sdk-${{ inputs.sdk_version }}
steps:
- name: Check out the code using the provided ref
uses: actions/checkout@v4
with:
ref: ${{ inputs.git_ref }}
# Lightweight tags don't need committer name and email
- name: Create a new git tag
run: |
git tag ${{ env.tag }}
- name: Push the new tag
id : push-tag
run: |
git push origin ${{ env.tag }}

View File

@@ -10,7 +10,7 @@ jobs:
rerun-on-failure:
name: 'Re-run ''${{ github.event.workflow_run.name }}'' workflow'
runs-on: ubuntu-22.04
# Do not re-run scheduled workflow runs. That's only Replay.io E2E tests for now.
# Do not re-run scheduled workflow runs
if: github.event.workflow_run.conclusion == 'failure' && github.event.workflow_run.event != 'schedule'
env:
BRANCH_NAME: ${{ github.event.workflow_run.head_branch }}

251
.github/workflows/tag-for-release.yml vendored Normal file
View File

@@ -0,0 +1,251 @@
name: Release 1a - Tag Release Artifact
run-name: Tag ${{ inputs.version }}
on:
workflow_dispatch:
inputs:
version:
description: 'Metabase version (e.g. v0.46.3)'
type: string
required: true
commit:
description: 'A full-length commit SHA-1 hash'
required: true
jobs:
start-message:
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Send build start message
uses: actions/github-script@v6
env:
SLACK_RELEASE_CHANNEL: ${{ vars.SLACK_RELEASE_CHANNEL }}
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
with:
script: | # js
const { sendReleaseMessage } = require('${{ github.workspace }}/release/dist/index.cjs');
await sendReleaseMessage({
stage: 'build-start',
github,
owner: context.repo.owner,
repo: context.repo.repo,
version: '${{ inputs.version }}',
runId: '${{ github.run_id }}',
releaseSha: '${{ inputs.commit }}',
}).catch(console.error);
check-version:
runs-on: ubuntu-22.04
timeout-minutes: 10
outputs:
ee: ${{ fromJson(steps.canonical_version.outputs.result).ee }}
oss: ${{ fromJson(steps.canonical_version.outputs.result).oss }}
steps:
- name: Fail early on the incorrect version format
if: ${{ !(startsWith(inputs.version,'v0.') || startsWith(inputs.version,'v1.')) }}
run: |
echo "The version format is invalid!"
echo "It must start with either 'v0.' or 'v1.'."
echo "Please, try again."
exit 1
- uses: actions/checkout@v4
with:
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get Release Version
uses: actions/github-script@v7
id: canonical_version
with:
script: | # js
const { isValidVersionString, getCanonicalVersion, hasBeenReleased } = require('${{ github.workspace }}/release/dist/index.cjs');
const version = '${{ inputs.version }}';
if (!isValidVersionString(version)) {
throw new Error("The version format is invalid! It must start with either 'v0.' or 'v1.'.");
}
const versions = {
ee: getCanonicalVersion(version, 'ee'),
oss: getCanonicalVersion(version, 'oss'),
};
const ossReleased = await hasBeenReleased({
github,
owner: context.repo.owner,
repo: context.repo.repo,
version: versions.oss,
});
const eeReleased = await hasBeenReleased({
github,
owner: context.repo.owner,
repo: context.repo.repo,
version: versions.ee,
});
if (ossReleased || eeReleased) {
throw new Error("This version has already been released!", version);
}
return versions;
check-commit:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Check out the code to verify the release branch
uses: actions/checkout@v4
with:
fetch-depth: 0 # IMPORTANT! to get all the branches
sparse-checkout: release
- name: Prepare build scripts
run: cd ${{ github.workspace }}/release && yarn && yarn build
- name: Get Release Branch
uses: actions/github-script@v7
id: release_branch
with:
result_encoding: string
script: | # js
const { getReleaseBranch } = require('${{ github.workspace }}/release/dist/index.cjs');
const version = '${{ inputs.version }}';
const releaseBranch = getReleaseBranch(version);
return releaseBranch;
- name: Ensure that the specified commit exists in the ${{ steps.release_branch.outputs.result }} release branch
run: |
RELEASE_BRANCH=${{ steps.release_branch.outputs.result }}
git checkout $RELEASE_BRANCH
git branch --contains ${{ inputs.commit }} | grep -q $RELEASE_BRANCH \
&& echo "Commit found in correct release branch" \
|| (echo "Commit not found in correct release branch" && exit 1)
tag-uberjar-for-release:
needs: [check-version, check-commit]
runs-on: ubuntu-22.04
timeout-minutes: 10
strategy:
matrix:
edition: [oss, ee]
env:
INTERACTIVE: false
steps:
- name: Get correct version number
run: | # bash
if [ '${{matrix.edition}}' == 'ee' ]; then
version='${{ needs.check-version.outputs.ee }}'
else
version='${{ needs.check-version.outputs.oss }}'
fi
echo "VERSION=$version" >> $GITHUB_ENV
- name: Setup Java
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 17 # 11 throws an error on jar uf
- name: Retrieve test build uberjar artifact for ${{ matrix.edition }}
id: find_release_artifact
uses: actions/github-script@v7
with:
result-encoding: string
script: | # js
const fs = require('fs');
const artifacts = await github.rest.actions.listArtifactsForRepo({
owner: context.repo.owner,
repo: context.repo.repo,
name: `metabase-${{ matrix.edition }}-${{ inputs.commit }}-uberjar`,
per_page: 1,
});
if (!artifacts.data?.artifacts?.[0]?.id) {
console.warn(`No existing artifacts found for ${{ inputs.commit }}, need to build jar`);
if ("${{matrix.edition}}" === 'oss') {
// only trigger the build job on OSS, otherwise we'll get double builds
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'build-for-release.yml',
ref: 'refs/heads/master',
inputs: {
commit: '${{ inputs.commit }}',
version: '${{ inputs.version }}',
}
});
}
throw new Error('aborting in favor of build script');
}
const artifact_id = artifacts.data.artifacts[0].id;
const download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: artifact_id,
archive_format: 'zip',
});
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/mb.zip`, Buffer.from(download.data));
- name: Unzip Metabase artifact containing an uberjar
run: |
unzip mb.zip
mv target/uberjar/metabase.jar metabase.jar
- name: Update version.properties in jar
run: | # sh
jar xf metabase.jar version.properties
echo "Old version.properties:"
cat version.properties
sed -i "s/^tag=.*/tag=$VERSION/" version.properties
echo "\n\nNew version.properties:"
cat version.properties
echo "\n\nUpdating metabase.jar with new version.properties"
jar uf metabase.jar version.properties
- name: Store commit's SHA-1 hash
run: echo ${{ inputs.commit }} > COMMIT-ID
shell: bash
- name: Calculate SHA256 checksum
run: sha256sum ./metabase.jar > SHA256.sum
shell: bash
- name: Upload JARs as artifact
uses: actions/upload-artifact@v4
with:
name: metabase-release-${{ matrix.edition }}-${{ inputs.commit }}-uberjar
path: |
./metabase.jar
./COMMIT-ID
./SHA256.sum
trigger-tests:
needs: [tag-uberjar-for-release]
permissions:
actions: write
runs-on: ubuntu-22.04
timeout-minutes: 5
steps:
- name: trigger pre-release testing
uses: actions/github-script@v7
with:
script: | # js
github.rest.actions.createWorkflowDispatch({
owner: context.repo.owner,
repo: context.repo.repo,
workflow_id: 'pre-release.yml',
ref: '${{ github.ref }}',
inputs: {
commit: '${{ inputs.commit }}',
version: '${{ inputs.version }}',
}
});

4
.gitignore vendored
View File

@@ -77,6 +77,7 @@ target/checksum.txt
xcshareddata
xcuserdata
dev/src/dev/nocommit/
dev/serialization_deltas/
*~
**/cypress_sample_database.json
**/cypress_sample_instance_data.json
@@ -111,3 +112,6 @@ modules/drivers/*/.lsp/*
# airgap
/resources/airgap/
# swc
.swc/

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 66 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 18 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 19 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 19 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 36 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 37 KiB

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 48 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 38 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.6 KiB

After

Width:  |  Height:  |  Size: 9.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.6 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 67 KiB

After

Width:  |  Height:  |  Size: 51 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 39 KiB

After

Width:  |  Height:  |  Size: 36 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 45 KiB

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

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