This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Dec 09, 2022
-
-
Case Nelson authored
Kondo made a recent change to try deriving positional information for introduced tokens, unfortunately it is rarely accurate and can make working with our macros difficult in lsp.
-
Cam Saul authored
-
- Dec 08, 2022
-
-
Cam Saul authored
* ≈ [WIP] [ci skip] * Minor cleanup [ci skip] * Code cleanup. [ci skip] * Kondo in CI should fetch library configs * Bump Methodical version * Change name to `=?` * Add `#exactly` reader tag * Add `#schema` data reader * Fix dev deps indentation and add `algo.generic` * Add `approx=` * Improved version of `#approx` * Just check in third party Kondo config for now instead of fighting CI * Update test/metabase/test_runner/assert_exprs/approximately_equal_test.clj Co-authored-by:
Tim Macdonald <tim@metabase.com> * Address PR feedback and fix sequence comparison Co-authored-by:
Tim Macdonald <tim@metabase.com>
-
Cam Saul authored
* Add import and export (SerDes v2) commands * Allow use of deprecated dump/load in EE tests
-
Bryan Maass authored
* memoize snowflake describe-database w/ 5 min ttl * pass in db-metadata where it is used, - rather than querying for it in random functions * update callsite of sync-tables-and-database! * let sync-metabase-metadata! look up db-metadata - only when needed * pass catalog (db), and schema to .getPrimaryKeys * let describe-table* add in the nil table-name * cleanup * use :snowflake instead of driver for inheritance * concurrent-sync-test should call describe-database once * cleaning up * call add-table-pks with 3 args * call add-table-pks with 3 args * try escaping entity names to appease Oracle Driver - Oracle wants the table-name to be escaped - escape is usually a no-op * pass driver to escape entity * pull get-table-pks into a multimethod, - handle the discrepancy directly in Oracle driver * remove inline def * fix colliding consistent-namespace linting - metabase.driver.sql-jdbc.common and metabase.driver.sql-jdbc.sync.common were mapped to sql-jdbc.common - metabase.driver.sql-jdbc.sync.common is now mapped to sql-jdbc.sync.common * fix reflection warnings * apply fix for getting oracle pks * nix an unused arg
-
- Dec 02, 2022
-
-
Aleksandr Lesnenko authored
* pie percent switch * review * Migrate to card viz-settings v.2 (#26798) * Migrate to card viz-settings v.2 This uses the new :pie.percent_visibility key (an enum) instead of a collection of booleans [#26776] * Move to def-json-migration * Don't migrate empty values * fix specs Co-authored-by:
Tim Macdonald <tim@metabase.com>
-
- Dec 01, 2022
-
-
Noah Moss authored
* initial implementation * some refactor and improved error handling * another refactor * fix reflection warning * add test and more refactor * another test * misc comment improvements and formatting * fix tests * small refactor * fix function call * address tamas's comments
-
- Nov 23, 2022
-
-
Anton Kulyk authored
* Move `DashCard` to its own directory * Move `DashCardParameterMapper` to `DashCard` dir * Remove disabled `DashCard` test files * Fix import * Move around `DashCardParameterMapper`
-
- Oct 26, 2022
-
-
Cam Saul authored
* Move metabase.config.file code => enterprise directory * Test fix
* Fix Kondo error * Fix Kondo errors * Remove unused namespace
-
- Oct 20, 2022
-
-
Cam Saul authored
* Initialize Metabase from a file * Code cleanup * Support optional template tags; more dox * Finish documentation for ns str * Force the first User to be an admin * Tests for DB creation * Add test to ensure that you can set User password with an {{env ...}} template * Remove data app permission code (#26016) * Revert "Use "apps" collection namespace for app collections (#25963)" This reverts commit a1894202. * Revert "Implement EE/Pro app permissions (#25764)" This reverts commit cf9b1bf5. * Revert "Implement global app permissions for the "All Users" group (#25679)" This reverts commit 63e950f2. * Revert "Require data permissions for executing actions (#25784)" This reverts commit 732bf6b1. * Revert "Prevent modifying app permissions via the collection endpoint (#25684)" This reverts commit 5d3f8279. * Revert "Implement DB specific execution permissions (#25629)" This reverts commit 141a13ce. * Revert "Introduce /execution/ permission (#25529)" This reverts commit 57cbb921. * Keep the app permission revision table * [Apps] Remove emitters (#25999) * [Apps] Remove emitters Emitters were created when we thought that we would be adding actions to multiple places in metabase. Instead we've coalesced to actions being a core feature of data-apps and are executed from within them. Attaching actions to models, as a form of re-use rather than a form of execution, means that actions can still be executed directly from a model, if we want to allow that in the future. * Fix lint errors * Move perform-action! tests out of the api. Since we want to keep the implicit bulk functionality but remove those endpoints move the tests to the actions namespace. * Fix linter * Change driver test to use function instead of endpoint Co-authored-by:
metamben <103100869+metamben@users.noreply.github.com> Co-authored-by:
Case Nelson <case@metabase.com>
-
- Oct 19, 2022
-
-
metamben authored
* Revert "Use "apps" collection namespace for app collections (#25963)" This reverts commit a1894202. * Revert "Implement EE/Pro app permissions (#25764)" This reverts commit cf9b1bf5. * Revert "Implement global app permissions for the "All Users" group (#25679)" This reverts commit 63e950f2. * Revert "Require data permissions for executing actions (#25784)" This reverts commit 732bf6b1. * Revert "Prevent modifying app permissions via the collection endpoint (#25684)" This reverts commit 5d3f8279. * Revert "Implement DB specific execution permissions (#25629)" This reverts commit 141a13ce. * Revert "Introduce /execution/ permission (#25529)" This reverts commit 57cbb921. * Keep the app permission revision table
-
metamben authored
* Create app collections in the "apps" collection namespace * Add test macro for setting global app permissions for "All Users" * Introduce app permission audit table
-
- Sep 29, 2022
- Sep 26, 2022
-
-
Cam Saul authored
* Switch to humane-are * Fix some busted `are`s * Remove unused namespaces
-
dpsutton authored
* Substitute persisted queries in parameter card references ```sql select o.total, o.quantity, model_p.category, model_p.title from orders o left join {{#14-pg-products}} model_p -- reference to products model on o.product_id = model_p.id limit 4 ``` Testing: I'm unhappy with how verbose the test is. At some point we're going to need a better, standardized way to test persistence. But the test makes a persisted table of the test-data.categories table (test/metabase/test/data/dataset_definitions/test-data.edn). It runs some sql to update the values in the table to turn `"Winery"` -> `"Winery from cached table"`, joins the two tables together to have both at once. There's a lot of moving pieces and the setup is a bit verbose. There's also no obvious place where these types of tests should go. We'll need to consolidate them in the future (and extend them). * persisted macro * docstring for `persisted-info-native-query` * alignments and small nits * Reuse persistence macro * clj-kondo cleanups * remove clj-kondo change before rebase
-
- Sep 22, 2022
-
-
Cam Saul authored
* 347 errors, 34 warnings * 89 errors, 66 warnings * 63 errors, 39 warnings * 52 errors, 33 warnings * 23 errors, 22 warnings * 13 errors, 4 warnings * Fix the last few errors. * Sort Kondo config
-
- Aug 23, 2022
-
-
Cam Saul authored
* [Toucan 2 prep] Don't invoke Toucan models as functions * Some fixes * Test fixes * Test fix * [Toucan 2 prep] Don't call `type` or `class` on Toucan models * Test fixes * More test fixes
* Replace perms protocol with multimethods; derive models from perms policy keywords * Test fixes * Appease Eastwood * Fix errors now that App has been merged in * Empty commit to trigger CI
-
- Aug 22, 2022
-
-
Cam Saul authored
* [Toucan 2 prep] Don't invoke Toucan models as functions * Some fixes * Test fixes * Test fix * [Toucan 2 prep] Don't call `type` or `class` on Toucan models * Test fixes * More test fixes
* [Toucan 2 Prep] Don't use <model>Instance classes * Sort namespaces -
Cam Saul authored
* [Toucan 2 prep] Don't invoke Toucan models as functions * Some fixes * Test fixes * Test fix * [Toucan 2 prep] Don't call `type` or `class` on Toucan models * Test fixes * More test fixes
-
Cam Saul authored
* [Toucan 2 prep] Don't invoke Toucan models as functions * Some fixes * Test fixes
-
- Aug 12, 2022
-
-
Cam Saul authored
* Fix some small things * Add Kondo to deps.edn to be able to debug custom hooks from REPL * Fix macroexpansion hook for with-temp* without values * Test config (WIP) * More misc fixes * Disable :inline-def for tests * More misc fixes * Fix $ids and mbql-query kondo hooks. * Fix with-temporary-setting-values with namespaced symbols * More misc fixes * Fix the rest of the easy ones * Fix hook for mt/dataset * Horrible hack to work around https://github.com/clj-kondo/clj-kondo/issues/1773 . Custom linter for mbql-query macro * Fix places calling mbql-query with a keyword table name * Fix the last few errors in test/ * Fix errors in enterprise/test and shared/test * Fix driver test errors * Enable linters on CI * Enable unresolved-namespace linter for tests * Appease the namespace linter again * Test fixes * Enable unused-binding linter for test/ => 293 warnings * 259 warnings * 234 warnings * => 114 warnings * Fix the rest of the unused binding warnings in test/ * Fix unused binding errors in enterprise/backend/test * Fix unused binding lint errors in driver tests * Test fix
* Assure Kondo that something is in fact used -
Cam Saul authored
* Fix some small things * Add Kondo to deps.edn to be able to debug custom hooks from REPL * Fix macroexpansion hook for with-temp* without values * Test config (WIP) * More misc fixes * Disable :inline-def for tests * More misc fixes * Fix $ids and mbql-query kondo hooks. * Fix with-temporary-setting-values with namespaced symbols * More misc fixes * Fix the rest of the easy ones * Fix hook for mt/dataset * Horrible hack to work around https://github.com/clj-kondo/clj-kondo/issues/1773 . Custom linter for mbql-query macro * Fix places calling mbql-query with a keyword table name * Fix the last few errors in test/ * Fix errors in enterprise/test and shared/test * Fix driver test errors * Enable linters on CI * Enable unresolved-namespace linter for tests * Appease the namespace linter again * Test fixes
-
- Aug 11, 2022
-
-
Cam Saul authored
* Enable clj-kondo for driver namespaces * Fix CI command * Fix CI config (?) * Try hardcoding the driver directories in CI config * Fix some busted stuff * Enable the redundant fn wrapper linter * Appease the namespace linter
-
- Aug 05, 2022
-
-
Case Nelson authored
Combined `with-query-action` and `with-http-action` into `with-action` that also allows options to be provided to override the created action. Chose to make `options-map` required, unlike with-temp, so kondo can use `let` to lint the macro rather than having to create a new hook.
-
- Aug 04, 2022
- Jul 26, 2022
-
-
Cam Saul authored
* Remove the `Dependency` model code * Appease the namespace linter again.
-
- Jul 25, 2022
-
-
Case Nelson authored
* wip * Update kondo hook for with-temp* `with-temp*` allows for unpaired bindings if you just want the default model. This would break the `let` that the hook was binding if you had an unpaired temp model followed by others. * Adding tests for emitters and actions Test hydration of :emitters Test hydration of :action Test http emitter execution Test emitter crud Test failure cases around emitter execution Small consistency changes made to non-test code that shouldn't affect happy path FE code, largely 404 checking and keyword/string consistency. * Fix unused requires * Fix macro resolution
-
- Jul 19, 2022
-
-
Cam Saul authored
* `:bulk/update` * Some refactoring. Add error handling and tests for `:bulk/update` * Remove unused namespace * PR feedback and some bug fixes * Make sure bulk/delete fails if you have all PK columns and also non-PK columns * Implement caching mechanism for Actions * Fix more `bulk/delete` tests for Postgres * Disable kondo error for `u/key-by` being deprecated * Fix duplicate test setup code in `bulk/delete` tests * Fix CircleCI job skipping magic: `$CIRCLE_STAGE` has been renamed to `$CIRCLE_JOB` * Fix Presto JDBC failures from `NOT NULL` column * Fix GA Card Save expected status code * Fix error message differences between Postgres versions * Update Snowflake DDL statements tests * Fix redundant `let` expressions * handle different error messages for different PG versions
-
- Jul 14, 2022
-
-
Cam Saul authored
* Actions multimethod refactor. * Fix function called with wrong number of args * Test fixes * Bulk create action (second pass) * Appease clj-kondo * Fix bulk insert happy path * Implement/fix everything * Linter and test fixes
* Fix bad metadata (thanks Eastwood!) * Add some comments about why we're doing what we're doing * Serdes v2 for Native Query Snippets (#23961) Also standardizes date/time output to `ZonedDateTime`, rather than whatever the JDBC happens to return. Co-authored-by:Braden Shepherdson <Braden.Shepherdson@gmail.com>
-
- Jul 08, 2022
-
-
Braden Shepherdson authored
Serialization of Databases, Tables, Fields This brought a few core changes: - Add `serdes-entity-id` to abstract the field used for the ID - Pass the options to `extract-one` so it can eg. do encryption things. - Handle dates in YAML storage and ingestion - `:serdes/meta` now holds the entire hierarchy, not just the leaf model+ID pair. There's an open problem here about the right way to handle secrets like a database's password. Do we assume both sides have the same `MB_ENCRYPTION_SECRET_KEY`? Provide a serdes-specific password the user just made up, and every secret gets decrypted with the source key, encrypted with the serdes key, stored, decrypted with the serdes key, and encrypted with the destination key?
-
- Jul 07, 2022
-
-
Braden Shepherdson authored
Write `storage.yaml` and `ingest.yaml` to serialize all the way to YAML files and back. Lots of generative testing to check it's isomorphic.
-
- Jun 16, 2022
-
-
Braden Shepherdson authored
-
- May 31, 2022
-
-
Braden Shepherdson authored
That is: collection, dimension, metric, native_query_snippet, pulse, report_card, report_dashboard, report_dashcard, segment, timeline Notably that doesn't include database, table, or field, since those all have external unique IDs that are used instead.
-
- May 19, 2022
-
-
Cam Saul authored
* `defsetting` setter functions should end in `!` * Fix typo * Update .clj-kondo/hooks/metabase/models/setting.clj * Fix clj-kondo for Toucan defmodel not emitting a docstring * Remove `^:private` metadata on a couple of Settings since it makes Eastwood fussy
-
- May 18, 2022
-
-
Bryan Maass authored
* Add `experimental-enable-actions` feature flag (#22559) * Add `experimental-enable-actions` feature flag * Simplify Ring middleware * Sort namespaces * Make sure api.actions is loaded * Add Database-local Setting for enabling Actions for a specific Database * SQL JDBC Delete Row Action (#22608) * SQL JDBC Delete Action [ci skip] * Add note about parsing values [ci skip] * transition to using mbql for actions/row/:action - TODO: how to setup a qp store? - TODO: better way to keywordize filters? * some cleanup [ci skip] * better message on delet statement conflicts - and a test * mt/with-everything-store -> seed store manually [ci skip] * fix some test input * get more tests passing * add more validation tests * privatize catch-throw * plug in and alter tests to use with-actions-test-data Co-authored-by:
Bryan Maass <bryan.maass@gmail.com> * Destructible version of `test-data` dataset for testing writeback actions (#22692) * Destructible version of `test-data` dataset for testing the actions stuff * Revert new precondition * Make sure api.actions is loaded * remove keep-me for api.actions Co-authored-by:
Cam Saul <1455846+camsaul@users.noreply.github.com> Co-authored-by:
Cam Saul <github@camsaul.com>
-
- May 17, 2022
-
-
Bryan Maass authored
* Revert "Revert new precondition" This reverts commit 1f97a4d6ccfdaa92ff82fd0256f08f3512c3c5e7. * Revert "plug in and alter tests to use with-actions-test-data" This reverts commit 2f33cb47b700b1da106adf54d41928c5956978d0. * Revert "Add Database-local Setting for enabling Actions for a specific Database" This reverts commit a52f8d0a478a31bb1f1b4a6693abf8f8e658d9cf. * Revert "Make sure api.actions is loaded" This reverts commit 7d7b913a7a0d64cbe2b6907f389d994a1130c0f5. * Revert "Add `experimental-enable-actions` feature flag (#22559)" This reverts commit 9b313752. * Revert "SQL JDBC Delete Row Action (#22608)" This reverts commit d6864f38. * Remove actions api docs * Revert "Destructible version of `test-data` dataset for testing writeback actions (#22692)" This reverts commit 15c57d9a. * keep around a few misc improvements * removes precondition - {:pre [(nil? (namespace symb))]} * various fixes that needn't be reverted
-
- May 13, 2022
-
-
Case Nelson authored
* Update persist model api permissions for EE On OSS, only Admins can enable model cache in `Settings/Cache`, enable database model cache in `Settings/Databases` and cache individual models. On EE/Pro, users with `Settings access` application permissions can enable model cache in `Settings/Cache` and users with `Manage database` can enable model cache for a database. * Add tests for application permissions
-
- May 09, 2022
-
-
Cam Saul authored
* Add `experimental-enable-actions` feature flag * Simplify Ring middleware * Sort namespaces * Make sure api.actions is loaded
-