This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Aug 05, 2021
-
-
Jeff Evans authored
Adding new cache to `metabase.driver.sql-jdbc.connection` that tracks the DB details hash values per DB id Checking if the non-empty hash value of DB details changed in `db->pooled-connection-spec` in order to invalidate an existing pool Adding test that redefines the log fn to assert that the pool is invalidated on hash change
-
Cam Saul authored
* Bump some more backend dependencies * Add license info for com.sun.activation/jakarta.activation * Fix reflection warnings * Revert bump of MariaDB for now
-
- Aug 04, 2021
-
-
Cam Saul authored
* Bump some backend deps. * Update i18n/locale to work with new version of LocaleUtils
-
- Aug 03, 2021
-
-
dpsutton authored
* remove moderation reviews hydration * Restore hydration of moderation_reviews and handle correctly nested hydration is (i think) positional. So if you get something handed to you you must return something in that position. Prevoiusly was removing nils and then returning a smaller collection of hydrated items (cards here). But this meant input might look like this [card1 nil card2] and return [card1 card2] and in the nested hierarchy things didn't get matched up correctly. In the real world application it might look like this: ```clojure {:ordered-cards [{:card-id 1} {:card-id nil :viz-settings {info-for text-card}} {:card-id 2}]} ``` And the nil card comes into this function and we return them in a strange manner things get wonky
-
Howon Lee authored
We're playing this whackamole because we added the middleware to universally sorta stomp on any `limit` or `offset` params, and they got stomped on. Which, in turn, led to my PR to make the default not limited. Which, in turn, led to the other issue this PR solves which makes the search things we relied upon to not have a limit, have a limit.
-
Cam Saul authored
* Add some dox * Rename test-runner & cloverage -> metabase.test-runner & metabase.cloverage-runner * Move JUnit-related test runner code to separate namespace * Bespoke JUnit-output code * Delete unused .lein-classpath file * Do JUnit writes in a cached thread pool * Add failing test to make sure JUnit output works as expected... * Move bad-test to metabase.bad-test so the FAILING tests actually run * FASTER TEST LOADING
* Test CircleCI :system-out * Final cleanup (hopefully) * Sort some namespaces; allow initializing :plugins when namespaces get loaded for now. * Need those [[tags]] in docstrings * Fix bad docstring -
Dalton authored
* rmv old bucm icons and remove verified fill color * add moderation action section to sidebar * add moderation review icon to the saved question header button * hide moderation section when is not a moderator * add UI for ModerationReviewBanner * Backend for moderation-review - create table moderation_review. Same as before but also has a "most_recent" boolean flag for the most recent moderation for easy lookup - POST /moderation-review/ . Status can be "verified" or nil - must be an admin to post - No PUT or edit route yet. Not sure if this is even necessary. _MAYBE_ to edit the text, but certainly not for the status, ids, etc. If there's to be history, let's build some history - Ensure we never have more than 10 reviews. Adding a new review will delete the older ones, mark all old ones as not `most_recent`, and add the newest one as `most_recent true` - Ensure the card actually exists before creating the mod review - Since admin only at this time, don't need to check moderate permission or view permission - When hydrating ensure reviews are ordered by id desc. Should mimic the created_at desc * fix moderation review banner tooltip offset * disable verification button when already verified * rmv iconOnly prop because it seems to do nothing * update getLatestModerationReview to rely on most_recent boolean * Return 400 on invalid status to post /moderation-review the schema was using keywords on the left hand side rather than the symbols. Required a change to the docstring generator, when it made a docstring for enums, it would call (sort (:vs enum)) and need to string em. * Add ModerationReview model to models.clj and copy infra * hydrate moderation reviews on cards * clean up + wire up to BE + ensure mod buttons don't show for normal users * rmv unused moderation redux logic from QuestionDetailsSidebarPanel * finish writing unit tests for FE * ensure getIconForReview returns an object * enable/disable verify button tooltip when unverified/verified * add e2e tests * fix tests * styling tweaks * more styling on moderationReviewBanner * add function for abbreviated timestamp * increase fontsize of timestamp back to 12 * fix tooltip offset * ensure custom locale is separate from 'en' and not used for other languages * Deletion moderation reviews when deleting cards i had actually thought this was a much larger problem. But it turns out we almost never delete cards (thanks comment!). And so we won't really generate a lot of garbage. I was worried that since we aren't using actual foreign keys but just `moderated_item_type "card"` and `moderated_item_id 2` we would have deleted cards with these moderation reviews but that is not the case as the cards aren't deleted. * hide verify disabled button when a question is verified * update test to use queryByTestId * Hydrate moderation reviews on cards on ordered cards * Handle mysql's lack of offset functionality mysql cannot handle just a `offset` clause, it also needs a limit clause grammar from https://dev.mysql.com/doc/refman/8.0/en/select.html: [LIMIT {[offset,] row_count | row_count OFFSET offset}] select id, name from metabase_field offset 5; -- errors select id, name from metabase_field limit 2 offset 5; -- works Since our numbers are so small here there is no worry and just do the offset in memory rather than jump through hoops for different dbs. * Batch hydrate moderation reviews * Don't let /api/user/:userId failure conceal moderation banner * fix moderation cy tests * work around possible bug in toucan hydration dashboards hydrate ordered cards (hydrate [:ordered_cards [:card :moderation_reviews] :series]) Ordered_cards are dashboard_cards which have an optional card_id. But toucan hydration doesn't filter out the nils as they go down. It seems toucan returns a nil card, and then when hydrating the moderation_review, passes the collection of all "cards" including the nil ones into the hydration function for moderation_reviews This feels like a bug to me * Cleanup moderation warnings * Docstring in moderation review * include hoisted moderated_status on cards in collections api * Expect unverified in test
Co-authored-by:dan sutton <dan@dpsutton.com> Co-authored-by:
Maz Ameli <maz@metabase.com> Co-authored-by:
alxnddr <alxnddr@gmail.com>
-
- Aug 02, 2021
-
-
Cam Saul authored
* Revert changes to activity and activity-test namespaces * Add some sanity-checks to help debug the failing test * Delete accidental newline
-
- Jul 30, 2021
- Jul 29, 2021
-
-
Cam Saul authored
* Fix some Eastwood failures * Fix a lot of Eastwood errors now that it runs against test namespaces [ci skip] * Run Eastwood against test namespaces [WIP] * Bump Eastwood version to fix some errors in Eastwood itself * Fix another lint warning * Fix test failure * More test fixes
* Fix all the warnings! * Test fix * Bump Eastwood GH action timeout to 20 minutes (!)
-
- Jul 28, 2021
-
-
dpsutton authored
-
Anton Kulyk authored
-
- Jul 27, 2021
-
-
Cam Saul authored
* Enable clj-kondo failures on missing docstring; remove bikeshed * Add missing docstrings
-
- Jul 23, 2021
-
-
Jeff Evans authored
Implement JDBC based Presto driver Adding new Presto JDBC driver using the PrestoDB JDBC driver from `https://github.com/prestodb/presto` Marking the old Presto driver as being `superseded-by` the new one Pulling out common Presto code into new presto-common driver (modeled after the relationship between, ex: `googleanalytics` and `google)` Putting common QP/HoneySQL logic into the new (abstract) :presto-common driver Updating :presto driver to extend from the new common driver and only adding HTTP/REST API related methods Adding implementation of Presto JDBC driver, named :presto-jdbc, extending from :presto-common and :sql-jdbc Using com.facebook.presto/presto-jdbc as underlying JDBC driver dependency (since this is explicitly for Presto clusters, as opposed to Trino) Adapting code from the existing Presto driver where appropriate Adding new dependency-satisfied? implementation for :env-var, to allow for a plugin to require an env var be set, and making the Presto JDBC driver depend on that (specifically: `mb-enable-presto-jdbc-driver`) Adding CircleCI configuration to run against the newer Presto (0.254) Docker image Adding explicit ordering in a few tests where it was missing Fixing presto-type->base-type (timestamps were being synced as :type/Time because the regex pattern was wrong) Add tx/format-name test implementation for :presto-jdbc to lowercase table name Make modified test Oracle friendly Fixing bug parsing the `[:zone :time]` case within `metabase.util.date-2.parse/parse-with-formatter`; the offset is nil so it can't be passed directly in this case, so use the `standard-offset` fn (which was moved from `date-2` to `common` to get a standard offset for that zone Fixing more test failures by adding explicit ordering Changing sync to check whether the driver supports foreign keys before attempting to sync those (since drivers might throw an exception if attempting to check) Moving some common test dataset functionality between :presto and :presto-jdbc to a new test.data ns for :presto-common Adding HoneySQL form for :count-where, since we have to explicitly give a higher precision Decimal in order for Presto to not reduce the precision in results Put limit within subquery for `expression-using-aggregation-test` (since ordering from subquery is not guaranteed in Presto) Adding impls for ->prepared-substitution to handle substitutions for native query params Adding HoneySQL impls for `mod` (to do as "mod(x,y)" and `timestamp` (since it's a function with no parens to invoke) functions Adding various `sql.qp/date` impls that use the `AT TIME ZONE` operator to account for report tz, and make bucketing tests happy
-
Jeff Evans authored
# Backend changes Introducing new `superseded-by` property to plugin manifest YAML, which will indicate the driver that is to eventually replace this one (and will drive UI/UX behavior). If a driver declares this property, then it's considered to be deprecated in favor of the specified one. Adding top level `test_modules` directory (with the same structure as modules) for the sole purpose of module/plugin testing of YAML files, which will not be included with the driver build Updating `driver-plugin-manifest` to look for the new `test_modules` directory in addition to `modules`, when loading the driver manifest # Frontend changes Calculate `supersededBy` and supersedes maps from the "superseded-by" property for each engine Change the options for the engine field to use a function to dynamically show the legacy driver if allowed by rules (either the new driver is selected, or the legacy driver was already selected for an existing DB, or the driver is not superseded by anything) Add new `DriverWarning` component to show these warnings based on supersede status Co-authored-by:
Anton Kulyk <kuliks.anton@gmail.com>
-
- Jul 22, 2021
-
-
Jeff Evans authored
Remove regionid from plugin YAML file Add new driver multimethod to `normalize db-details`, and implementing to handle this particular "migration" within Snowflake Adding hook from database model post-select to invoke the new multi Adding test
-
- Jul 20, 2021
-
-
Noah Moss authored
-
- Jul 19, 2021
-
-
dpsutton authored
* offset is a reserved word in mariadb as of 10.6 - https://mariadb.com/kb/en/reserved-words/ - https://github.com/MariaDB/server/commit/299b935320 I think it is related to https://jira.mariadb.org/browse/MDEV-23908 "Implement SELECT ... OFFSET ... FETCH ..." * Handle new names for utf8 in mariadb https://mariadb.com/kb/en/unicode/ - utf8: Until MariaDB 10.5, this was a UTF-8 encoding using one to three bytes per character. Basic Latin letters, numbers and punctuation use one byte. European and Middle East letters mostly fit into 2 bytes. Korean, Chinese, and Japanese ideographs use 3-bytes. No supplementary characters are stored. From MariaDB 10.6, utf8 is an alias for utf8mb3, but this can changed to ut8mb4 by changing the default value of the old_mode system variable. - utf8mb3: UTF-8 encoding using one to three bytes per character. Basic Latin letters, numbers and punctuation use one byte. European and Middle East letters mostly fit into 2 bytes. Korean, Chinese, and Japanese ideographs use 3-bytes. No supplementary characters are stored. Until MariaDB 10.5, this was an alias for utf8. From MariaDB 10.6, utf8 is by default an alias for utf8mb3, but this can changed to ut8mb4 by changing the default value of the old_mode system variable.
-
- Jul 15, 2021
-
-
Cam Saul authored
* Fix Card async-metadata running query even when metadata can be determined programatically * Update another test * Adjust affected repros by waiting for the metadata to load (#17068) * Wait for the `result_metadata` to load * Reduce the number of bins for the faster execution * Update repro for #12568 Co-authored-by:
Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
-
- Jul 14, 2021
-
-
Nemanja Glumac authored
I thought (and assured dpsutton, lol) that the default behavior of the pagination spliced in was just not paginating, if there wasn't a limit passed in. Unfortunately, it appears that I tested this on the endpoint without pagination spliced in... so the default behavior isn't that way, it paginates if you don't pass in stuff. So rip it out of the DB endpoint (only) for now and put it back in when we paginate Authored-by:
Howon Lee <hlee.howon@gmail.com>
-
dpsutton authored
* Smartscalars * smartscalar html styling * Docstring, ns, prevent top-level trs/tru
-
- Jul 12, 2021
-
-
Bruno Bergher authored
* Remove email quotations which could be deemed controversial. Address part of #11155 * Trigger deploy Co-authored-by:
Bruno Bergher <me@brunobergher.comexport>
-
- Jul 09, 2021
-
-
dpsutton authored
* Scalar rendering as text in slack * Fix tests for pulse * Tests for slack scalars
-
- Jul 08, 2021
-
-
Alexander Lesnenko authored
* fix Saved questions string translation * fix Everything else folder is not showing items in the saved question picker for other languages * translate query builder header * Fix saved questions db on the client side * i18n on "Saved Questions" Co-authored-by:
dan sutton <dan@dpsutton.com>
-
Bonifacio de Oliveira authored
-
Tim Macdonald authored
-
- Jul 07, 2021
-
-
Noah Moss authored
-
- Jul 06, 2021
- Jun 30, 2021
-
-
dpsutton authored
* Breadth first search on graph for chain filters - abandons at max-depth and looks in breadth first fashion rather than descending as far as possible on each possible path * Add loop detection not actually fooled by loops since we abandon after a certain path length. But will remove some false starts before they have to be killed by the path length check. * Add seen optimization of nodes We reach nodes in the shortest path possible, so keep a list of nodes visited and don't revisit them: we got to them as fast as possible, and once there, there's no new nodes that we can see from that vantage point. This allows a serious speedup and should hopefully fully resolve the cpu issues seen by some. * alignment
-
- Jun 28, 2021
-
-
Noah Moss authored
-
Cam Saul authored
-
Cam Saul authored
* Fix Oracle/Vertica comparison against empty string * Remove extra println * Add test for ::empty-string-is-null
-
Cam Saul authored
* Fix SQL saved question reference to Saved Questions with parameters * Test fixes
* Don't run test for drivers that don't support FKs * Test fix * Test fix -
Howon Lee authored
When metrics get macro-expanded in xrays, they don't have joins in them. I stick joins in them. Joins! Joins! Joins! But the underlying problem is that the metric macros have no idea what this "join" business is. Unhappy times!
-
- Jun 23, 2021
-
-
dpsutton authored
* Only save successful-query-execution if it wasnt a cached result the only thing this function does is update the rolling average query execution time * Failing tests for cache execution stats These tests fail, but they shouldn't. The save-execution information should not be called twice, and the average execution duration should remain the same. What's happening is that it is getting called twice just in the cache call, and only one of those has the new key `:metrics/ignore-execution-time`. This remains a mystery to me * Don't call completion arity from step arity the `(rf acc)` call violated the terms of transduction. If it does need to be there, perhaps it could be used with reduced wary of #12207 (which fixes #12165) and seeing if that crops up again. - i had introduced :metrics/ignore-execution-time but this was because i thought that we were running a simple query (limit 1) to get col metadata. Now that i know we were just being a bit careless with `(rf acc)` this extra information is no longer needed, and we can just react to cached data. * hoist closing paren
-
Cam Saul authored
-
Noah Moss authored
-