This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Mar 15, 2023
-
-
Ngoc Khuat authored
-
Ngoc Khuat authored
-
- Mar 14, 2023
-
-
Bryan Maass authored
* defendpoint auto coercion :arrow-heading-up::gear: * annotate all the id fields on the api with ms/Id * mark nillable "boolean" * update shape of action map - also improve the error messages with "recieved: _" * oh yeah! there are like 20 more *id*'s! * fix docstring + parse numbers properly * rename IntGreaterThanZero -> PositiveInt - remove ms/Id * fiddle with test wording * add regexes into compojure routes to avoid arbitrary route matching * tests for compojure route disambiguation w/ regex * trivial change to kick CI * minor refactor + update docstring * add nil condp default case * fix linter errors that snuck through .. somehow * fix typo + update tests that no longer regex-match
-
Tim Macdonald authored
* Users can execute actions if they can read the model and the DB is not blocked [Fixes #28425]
-
Bryan Maass authored
-
Cal Herries authored
* Optimize average case DB calls * Typo * Fix test * Remove duplicate require * Return nil * Fixes * Fix docstring * Remove unused require * Avoid hydrating ordered_cards on the dashboard again * Tidy * Update docstring * Move transaction * Move comment * Remove dashboard->param-field-ids * whitespace * Tidy update-dashcards! * Updates from suggestions * Update test * Update test description Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com> --------- Co-authored-by:
Ngoc Khuat <qn.khuat@gmail.com>
-
- Mar 13, 2023
-
-
Jerry Huang authored
* change documentation * change code comment to match
-
Case Nelson authored
* Initial aggregation functions for metabase-lib * Remove comment for build? * Move defop to common * Add docstrings * Make eastwood happy
-
Cam Saul authored
* lib.equality * Better generation
-
Mark Bastian authored
Updated kixi/stats lib from 0.44 to 0.5.5.
-
Nick Fitzpatrick authored
* Adding Show Total toggle, adding unit tests * adjusting unit test, fixing logic * Adding Static Viz test. PR Feedback
-
john-metabase authored
* Moves to actively-maintained clj-yaml and removes obsolete pinned deps * Adds discouraged namespace rule for clj-yaml (use metabase.util.yaml) Co-authored-by:
Braden Shepherdson <braden@metabase.com>
-
Alexander Polyankin authored
-
Cal Herries authored
* Add migration for deleting the abandonment email task * Start+stop scheduler around the migration * Update clj-kondo * Rename migration * Change to 46 * Fix define-migration * Add test * Update ns description * Remove stop-scheduler! from migration * Remove migration dependency on metabase.task * Restore mdb.connection -> mdb * Update custom-migrations ns docstring * Remove unused code * Fix comment
-
- Mar 10, 2023
-
-
adam-james authored
* WIP for better axes grouping in static viz. Double x-axis and single x-axis are different, but both can have situations where grouping might occur, so the implementation is a tad confusing. I'm trying to build test cases that represent both scenarios reasonably, and build an implementation that's not too confusing. * Fix reflection warnings in render test utils * Overlap calcs don't fail with BigDecimal inputs now. * Continuing to clean up overlaps calcs and impl for single/double in progress * WIP version that works for single-x multi-series and double-x multi There's a lot to think about here... But basically, handle rows of shape: double-x: [[x1 x2] [y]] and single-x: [[x] [y1 y2 y3]] * Single and Multi X axis now use same axes grouping strategy * Cover some overlap scoring cases. This may need improving in future still, but the overlap calculation is at least used for both single-x and multi-x axis scenarios now, which is a definitie improvement. * Missed these unused bindings in test let body * overlap calc won't fail if we pass in `[nil nil]` * Clean up grouping axes implementation addressing review feedback. - overlap and nearness split into two functions - add the fn 'axis-group-score' to call overlap/nearness appropriately, and handle condition checks (eg. nil vals) - removed old group-axes and now unnecessasry default-y-axis-pos fn -> handled by group-axes-at-once fn - axis group threshold not passed as arg anymore * Fixed some alignment mistakes
-
dpsutton authored
* List all actions previously `api/action` required `?model-id=<model-id>`. This caused the FE to DOS the backend looping over each action. On stats I found 350 or so sequential requests, with app-db saturation leading to requests taking from 400ms near the beginning to 7seconds near the end. This makes `model-id` option and now returns actions on all models the user can see. ``` ❯ http GET "localhost:3000/api/action" Cookie:$SESSION -pb [ { "archived": false, "creator": {...}, "creator_id": 1, "database_id": 3, "dataset_query": {...}, "id": 1, "model_id": 1, "name": "source = foo", "parameter_mappings": null, "parameters": [...], ... } ... ] ``` * update frontend for action picker to support single action list endpoint * list actions tests * update actions e2e tests * Return empty vector if no results Running tests locally might return some extra actions not asserted on in the tests. And there you might expect a 200. But CI runs with an empty database and returns no response so you get a 204. Quite annoying and there's no good way to expect a "2xx" status code at the moment. So just return the empty vector so it's always a 200 code. * update actions endpoint unit test mocks * Simplify logic a little * docstring tweak * schema with better error message * update mocks to accept optional modelId * simplify sorting and grouping * make sort case-insensitive * simplify action api test mocks --------- Co-authored-by:
Ryan Laurie <iethree@gmail.com>
-
dpsutton authored
* Handle models with joins We had been using the metadata from the query to get column names, and then `select (column-names) from persisted-table`. But joins affect how columns are emitted. For this tests, using orders join to products, selecting order.total and product.category. And the metadata from running this query uses the normal names `:name "total"`, and `:name "category"`. _BUT_ the emitted sql does not use these names: ```sql SELECT "public"."orders"."total" AS "total", "products"."category" AS "products__category" -- <-------- FROM "public"."orders" LEFT JOIN "public"."products" AS "products" ON "public"."orders"."product_id" = "products"."id" ``` When we persist, we do `create table as <(qp/compile query)> so we were creating a column named `products__category` _NOT_ "category". But later on we would select "category" and this would blow up. ```sql select "total", "category" -- <- category doesn't exist in this table from "metabase_cache_424a9_8"."model_1105_txbhmkrnoy" ``` Now a query of `{:source-table "card__<model-id>"}' emits the following query when the persisted cache is substituted: ```sql SELECT "source"."total" AS "total", "source"."products__category" AS "products__category" FROM (select * from "metabase_cache_424a9_8"."model_1152_lecqfzcjke") AS "source" LIMIT 1048575 ``` * Test and lint fixes
-
Ngoc Khuat authored
* Exclude non-required PKs from implicit create actions
-
Ngoc Khuat authored
-
Ngoc Khuat authored
-
- Mar 09, 2023
-
-
Cam Saul authored
* MLv2 metadata overhaul, second try * Stricter linting for MLv2 * Address PR feedback * Revert fancy fn schema for now * Remove unused import * Test fixes
* Oops fix bad :require form * MLv2 mega metadata overhaul 2 of infinity * Test fixes * Cljc humanization * Misc MLv2 improvements from #28921 * Fix indentation * expression.non-integer-real * Remove debugging stuff * More cleanup * Add method for `:advanced` * non-integer-real * Test fixes * Test fixes: ::ref/field shouldn't fail if checked against a non-sequential object * MLv2 `define-mbql-clause` and `type-of` calculation * Continued [ci skip] * MLv2 overhaul :flex: * Address PR feedback * Merge type-of overhaul * Address PR feedback -
Cam Saul authored
* MLv2 `define-mbql-clause` and `type-of` calculation * Continued [ci skip] * MLv2 overhaul :flex:
-
Mark Bastian authored
Upgraded com.snowplowanalytics/snowplow-java-tracker from 0.12.0 to 1.0.0. This did require refactoring the `metabase.analytics.snowplow` ns to use the new fluent API as well as suppressing eastwood linting of the ns due to a classloader issue as described [here](https://github.com/jonase/eastwood/issues/444).
-
john-metabase authored
* Reorganizes serdes v2 namespaces and some functions/multimethods to simplify implementation * Updates serdes v2 to store/load :serdes/meta in YAML to remove ingestion path matching
-
Ngoc Khuat authored
-
dpsutton authored
* Remove personal collections from collection detail page https://github.com/metabase/metabase/pull/28023 Added "sub collections" to the collection detail page. Makes sense. The problem is that personal collections started appearing in this view. We have traditionally treated personal collections as siblings to the "Our Analytics" root of collections. So this was an impedence mismatch. This PR just removes all personal collections from the items returned from `"api/collection/root/items"`. The personal collection is still visible in the sidebar (returned from `api/collection/tree?tree=true&exclude-other-user-collections=true&exclude-archived=true` . Furthermore, all personal collections are still visible from the "three dots" menu on the sidebar. * poke ci * remove last personal collections from tests * e2e tests don't include a personal collection in the details page. * off by one from removing personal collections * Can't select personal collections if they aren't there
-
Cal Herries authored
-
Cal Herries authored
* Remove retrieve-dashboard-card call * Have `update-dashboard-card!` return nil, not true
-
- Mar 08, 2023
-
-
Cam Saul authored
* MLv2 metadata overhaul, second try * Stricter linting for MLv2 * Address PR feedback * Revert fancy fn schema for now * Remove unused import * Test fixes
* Oops fix bad :require form * Misc MLv2 improvements from #28921 * Fix indentation * expression.non-integer-real * Remove debugging stuff * More cleanup * Test fixes: ::ref/field shouldn't fail if checked against a non-sequential object -
metamben authored
* Make nil equality comparable * Add Malli schema for filter expressions
-
- Mar 07, 2023
-
-
Cam Saul authored
* MLv2 metadata overhaul, second try * Stricter linting for MLv2 * Address PR feedback
-
Noah Moss authored
* bind *card-id* when executing a dashboard subscription so that perm checks work properly * refactor & address test comment * fix spacing * unskip repro that this also fixes
-
Noah Moss authored
-
dpsutton authored
* Fix flaky test and test for a new case flaky test was annoying. It would timeout after 45 seconds. And annoyingly, it times out on the _client_, not the server. So we don't get the proper error message we expect. And what's happening is that the backend just hooks up the pipe from it's request to the response. And if no bytes ever come across, we just twiddle our thumbs until the http request in the test gives up. The only reliable way i could think of to fix this is to spin up a webserver that just accepts and then ignores requests (which is what github did to us in the flaky test). Had to bump the ring adapter to get the newly exposed `:async-timeout 60000` parameter. By default the webserver in the test has a timeout of 30 seconds, which is shorter than the 45 second timeout for the test's request to the geojson endpoint. * add comment * clean up test server logic --------- Co-authored-by:
Nemanja Glumac <31325167+nemanjaglumac@users.noreply.github.com>
-
- Mar 06, 2023
-
-
Cam Saul authored
Clean up `metabase.query-processor-test.timezones-test/filter-datetime-by-date-in-timezone-test` (#28474) * Get more info about flaky presto test failures * Include testing context * Fix flaky test
-
- Mar 04, 2023
-
-
Case Nelson authored
Fixes #25378 When using a relative filter with a starting from n units ago on an aggregation with the same units, we were incorrectly assuming that we would be working with a field ref at the top level. However, in this scenario the field is nested such as `[:+ [:field $created_at {:temporal-unit :month}] [:interval 1 :month]]`. This change makes sure that we are altering the field-ref.
-
- Mar 03, 2023
-
-
Cam Saul authored
* Conversion functions to and from pMBQL * Appease Kondo
-
Ngoc Khuat authored
* improve delete/update message for actions Co-authored-by:
Cal Herries <39073188+calherries@users.noreply.github.com>
-
Ngoc Khuat authored
Co-authored-by:
Cal Herries <39073188+calherries@users.noreply.github.com>
-
- Mar 02, 2023
-
-
john-metabase authored
Adds --include-field-values flag to serdes v2 export command
-