This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Apr 13, 2023
-
-
Natalie authored
-
Anton Kostenko authored
-
Case Nelson authored
* [MLv2] Remove and replace fields clause * Add docstring
-
dpsutton authored
* Delete old persistence schemas in redshift Reminder that recently a change occurred that populates a cache_info table in each persisted schema: ```sql -- postgres/redshift test-data=# select * from metabase_cache_424a9_379.cache_info ; key | value ------------------+-------------------------------------- settings-version | 1 created-at | 2023-03-29T14:16:24.849866Z instance-uuid | 407e4ba8-2bab-470f-aeb5-9fc63fd18c4e instance-name | Metabase Test (4 rows) ``` So for each cache schema, we can classify it as - old style (a commit before this change. more and more infrequent) - new style recent - new style expired And we can delete them accordingly in startup: ``` 2023-04-11 20:09:03,402 INFO data.redshift :: Dropping expired cache schema: metabase_cache_0149c_359 2023-04-11 20:09:04,733 INFO data.redshift :: Dropping expired cache schema: metabase_cache_0149c_70 2023-04-11 20:09:05,557 INFO data.redshift :: Dropping expired cache schema: metabase_cache_0149c_71 2023-04-11 20:09:06,284 INFO data.redshift :: Dropping expired cache schema: metabase_cache_0149c_90 ... 2023-04-11 20:20:33,271 INFO data.redshift :: Dropping expired cache schema: metabase_cache_fe4a7_90 2023-04-11 20:20:34,284 INFO data.redshift :: Dropping old cache schema without `cache_info` table: metabase_cache_8f4b8_358 2023-04-11 20:20:35,076 INFO data.redshift :: Dropping old cache schema without `cache_info` table: metabase_cache_8f4b8_69 ... ``` It's possible this will at first cause a few flakes if we are unlucky enough to drop a cache schema without `cache_info` for an instance that is running tests at that point. But the `cache_info` table has been backported so the chances of that become smaller each day. I've let a week elapse from that change before committing this so hopefully it is not an issue in practice. Number of queries: Makes a single query to get all schemas, then for each schema makes a query to classify it. This can be unified into a single query with some shenanigans like ```clojure (sql/format {:select [:schema :created-at] :from {:union-all (for [schema schemas] {:select [[[:inline schema] :schema] [{:select [:value] :from [(keyword schema "cache_info")] :where [:= :key [:inline "created-at"]]} :created-at]]})}} {:dialect :ansi}) ``` But i found that this query is extremely slow and does not offer any benefit over the simpler, repeated queries. And as we run this on each commit now, the number of schemas will be far lower and it will be on the order of 5-10 schemas (and therefore queries) and therefore not an issue. * Ngoc's suggestions - docstring for `delete-old-schemas!` - combine nested `doseq` - use java-time over interop with java.time
-
Jeff Bruemmer authored
-
Jeff Bruemmer authored
-
Anton Kostenko authored
* Build experimental multi-arch docker image (partially #13119)
-
Cam Saul authored
* Fix `type-of` calculation for `:power` clauses * Test fix
-
Alexander Polyankin authored
-
Alexander Polyankin authored
-
Ngoc Khuat authored
* makes sure serdes can find and handle toucan2 models
-
- Apr 12, 2023
-
-
Mark Bastian authored
Using SqlFormatter config to prevent incorrect expansion of metabase parameters when formatting.
-
Mark Bastian authored
Better metabot logging, especially around generated token counts. This will be particularly useful as we determine what size of prompts we can generate.
-
dpsutton authored
This reverts commit 8a11e382. The namespace `metabase.server.middleware.security` controls our content security policy header. In dev we allow connections to 8080 for webpack assets. Not dev we deny these. `clj -M:run` is dev since it is running the project from source, not a jar. This `mb.run.mode` was removed when we were fighting require issues for `metabase.query-processor-test.test-mlv2`. That's solved so we can restore the dev property to `:run`.
-
Cam Saul authored
* MLv2: fix join `:fields` conversion (#29898) * Remove test skip rule
-
Cam Saul authored
-
Mark Bastian authored
Fixed missing seed {} in a reduce and added tests.
-
dpsutton authored
in query_processor.clj we were requiring ```clojure (when-not config/is-prod? (classloader/require 'metabase.query-processor-test.test-mlv2)) ``` And this was blowing up as it was not present in the aliases used for cypress and the FE crew. Now user.clj requires it in the same way that it requires `[metabase.test-runner.assert-exprs]` so we can run tests with `partial=` and their ilk. And it is required by the test entry namespace so CI and test runners find it as well. The `resolve` command in query_processor.clj now works in dev and CI ```clojure query-processor=> (resolve 'metabase.query-processor-test.test-mlv2/post-processing-middleware) ,#'metabase.query-processor-test.test-mlv2/post-processing-middleware ``` (comma to prevent commit message from eliding as a comment) so presumably tests that require the middleware tricks from this test namespace will continue to work.
-
Case Nelson authored
* [MLv2] Remove and replace clause for filters * Convert external-op to internal for remove * Update calls for master
-
Jeff Bruemmer authored
-
Cam Saul authored
-
Anton Kulyk authored
-
Nemanja Glumac authored
* Update the position description of "clear all filters" * Add missing links to `models` page
-
Cam Saul authored
* Column grouping [WIP] * MLv2 Column Grouping * Oops need to munge name * Code overhaul * Test fixes
-
Anton Kulyk authored
-
metamben authored
This is a just a quick patch to make master green again after incompatible parallel merges.
-
metamben authored
* Implement change-direction for orderings See #29694 for details.
-
Denis Berezin authored
-
- Apr 11, 2023
-
-
Aleksandr Lesnenko authored
-
Braden Shepherdson authored
Fixes #29989
-
Cam Saul authored
* Add QP test middleware to validate converted pMBQL queries against MLv2 schema * Revert 'fix' for #29944 * Fix ups * Hack * Fix final test failure * Remove unused namespace * MLv2 metadata calculation validation * Handful of test fixes
* Fix Kondo warning * Skip #29958 * Don't barf when metadata is missing * Skip percentile tests * Update skip rule for #29910 to skip `:convert-timezone` with string literal date * Fix Saved Question js metadata * Update e2e test * Update Cypress test -
Cam Saul authored
* Add QP test middleware to validate converted pMBQL queries against MLv2 schema * Revert 'fix' for #29944 * Fix ups * Hack * Fix final test failure * Remove unused namespace * MLv2 metadata calculation validation * Handful of test fixes
* Fix Kondo warning * Skip #29958 * Don't barf when metadata is missing * Skip percentile tests * Update skip rule for #29910 to skip `:convert-timezone` with string literal date -
Cam Saul authored
* Add QP test middleware to validate converted pMBQL queries against MLv2 schema * Revert 'fix' for #29944 * Fix ups * Hack * Fix final test failure * Remove unused namespace * Fix Kondo warning * Skip #29958 * Fix #29970 * Thank you @metamben
-
Cam Saul authored
-
Cam Saul authored
* Add QP test middleware to validate converted pMBQL queries against MLv2 schema * Revert 'fix' for #29944 * Fix ups * Hack * Fix final test failure * Remove unused namespace * Fix Kondo warning * Skip #29958 * Add MLv2 schema for `:var` * Fix typo * Additional tests.
-
Denis Berezin authored
-
metamben authored
-
Case Nelson authored
* Add current-breakout function * Add handling for breakouts to remove and replace clause * Fix tests and cljs compile * Fix lints * Address PR comments * Adjust naming based on PR comments * Move remove and replace clause to avoid circular def * Fix js requires * Fix JS requires * Update for filter to filters change * Address PR comment
-
metamben authored
* Rename current-filters to filters * Unify return values of pMBQL interrogation functions aggregations, breakouts, expressions, filters, order-bys all return nil instead of an empty vector.
-
Ariya Hidayat authored
-