This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Aug 29, 2024
-
-
github-automation-metabase authored
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>
-
github-automation-metabase authored
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>
-
github-automation-metabase authored
* 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>
-
github-automation-metabase authored
* handle cache config overflowed * fix root too * do not comment out test * make cljfmt happy --------- Co-authored-by:
Alexander Solovyov <alexander@solovyov.net>
-
metamben authored
* 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
-
github-automation-metabase authored
Co-authored-by:
Nick Fitzpatrick <nickfitz.582@gmail.com>
-
github-automation-metabase authored
Co-authored-by:
Alexander Solovyov <alexander@solovyov.net>
-
github-automation-metabase authored
Co-authored-by:
Alexander Solovyov <alexander@solovyov.net>
-
github-automation-metabase authored
Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com>
-
github-automation-metabase authored
Co-authored-by:
Chris Truter <crisptrutski@users.noreply.github.com>
-
- Aug 28, 2024
-
-
github-automation-metabase authored
Co-authored-by:
Jeff Bruemmer <jeff.bruemmer@gmail.com>
-
github-automation-metabase authored
Co-authored-by:
Noah Moss <noahbmoss@gmail.com>
-
github-automation-metabase authored
* 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>
-
github-automation-metabase authored
* remove prevent default on CP links * unit flakes? Co-authored-by:
Nick Fitzpatrick <nick@metabase.com>
-
github-automation-metabase authored
Co-authored-by:
Anton Kulyk <kuliks.anton@gmail.com>
-
github-automation-metabase authored
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>
-
Alexander Solovyov authored
-
- Aug 27, 2024
-
-
github-automation-metabase authored
Co-authored-by:
Aleksandr Lesnenko <alxnddr@users.noreply.github.com>
-
github-automation-metabase authored
Resolved conflicts in legacy-ref-test related to a metrics test that depends on changes that weren't backported. Relevant unbackported changes in 460ac41f 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>
-
github-automation-metabase authored
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>
-
github-automation-metabase authored
* clarify caching doc * edit Co-authored-by:
Jeff Bruemmer <jeff.bruemmer@gmail.com>
-
github-automation-metabase authored
Failing after changes in 13983247 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>
-
github-automation-metabase authored
Co-authored-by:
Uladzimir Havenchyk <uladzimir.dev@gmail.com> Co-authored-by:
Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
-
github-automation-metabase authored
-
github-automation-metabase authored
Co-authored-by:
Metabase bot <metabase-bot@metabase.com>
-
github-automation-metabase authored
Co-authored-by:
Chris Truter <crisptrutski@users.noreply.github.com>
-
github-automation-metabase authored
backported "Use more precise query contexts when recording execution of public downloads" (#47239) Co-authored-by:Noah Moss <noahbmoss@gmail.com>
-
github-automation-metabase authored
* Convert e2e-custom-column-helpers to TS * Refactor createTimeline, createTimelineEvent & createTimelineWithEvents to TS * Fix circular imports Co-authored-by:
Kamil Mielnik <kamil@kamilmielnik.com>
-
- Aug 26, 2024
-
-
github-automation-metabase authored
* 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>
-
github-automation-metabase authored
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>
-
github-automation-metabase authored
Co-authored-by:
Jeff Bruemmer <jeff.bruemmer@gmail.com>
-
github-automation-metabase authored
* 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>
-
github-automation-metabase authored
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>
-
github-automation-metabase authored
* 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>
-
github-automation-metabase authored
* 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>
-
github-automation-metabase authored
Co-authored-by:
Raphael Krut-Landau <raphael.kl@gmail.com>
-
metabase-bot[bot] authored
Co-authored-by:
Alexander Solovyov <alexander@solovyov.net>
-
github-automation-metabase authored
* 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>
-
github-automation-metabase authored
Co-authored-by:
Uladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
-
github-automation-metabase authored
* [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>
-