This project is mirrored from https://github.com/metabase/metabase.
Pull mirroring updated .
- Jun 20, 2022
-
-
Nemanja Glumac authored
-
- Jun 18, 2022
-
-
Cam Saul authored
* Disallow `(str ...)` forms for `defsetting` description * Fix a handful of `(str (deferred-tru ...))` forms * Fix some cases of `(ex-info (deferred-tr* ...))` * Appease clj-kondo * Remove unused reference
-
- Jun 17, 2022
-
-
Natalie authored
-
Aleksandr Lesnenko authored
* override product voice * review
-
Ariya Hidayat authored
-
Natalie authored
-
Natalie authored
-
Aleksandr Lesnenko authored
-
Nemanja Glumac authored
-
Mahatthana (Kelvin) Nomsawadi authored
* Remove unused file * Fix user name not showing in admin audit * Fix receiving wrong prop name * Fix collection UI broken when showing editor's long email
-
Ariya Hidayat authored
-
- Jun 16, 2022
-
-
Cal Herries authored
* Remove extra whitespace in defendpoint * [ci nocache] Co-authored-by:
Luis Paolini <paoliniluis@gmail.com>
-
dpsutton authored
MBQL goes through a different path. This is only for native queries. Also the diff is huge. Ignoring whitespace shows a very modest diff: ```diff "month" {:unit-range month-range :to-period t/months} + "quarter" {:unit-range relative-quarter-range + :to-period (comp t/months (partial * 3))} "year" {:unit-range year-range :to-period t/years}}) ... "past2months~" {:end "2016-06-30", :start "2016-04-01"} "past13months" {:end "2016-05-31", :start "2015-05-01"} + "past2quarters" {:end "2016-03-31", :start "2015-10-01"} + "past2quarters~" {:end "2016-06-30", :start "2015-10-01"} "past1years" {:end "2015-12-31", :start "2015-01-01"} "past1years~" {:end "2016-12-31", :start "2015-01-01"} ``` Helpful Testing Strategies -------------------------- Sample DB ========= `select id, created_at from orders where {{created_at}}` and set a field filter of type "Date Filter" Custom Table ============ Create a table that has entries in the middle of each quarter. ```sql esting=# create table quarters (id serial primary key not null, description text, t timestamptz); CREATE TABLE testing=# insert into quarters (description, t) values ('Q1 2022', '2022-02-01'), ('Q2 2022', '2022-05-01'), ('Q3 2022', '2022-08-01'), ('Q4 2022', '2022-11-01'); INSERT 0 4 testing=# select * from quarters; id | description | t ----+-------------+------------------------ 1 | Q1 2022 | 2022-02-01 00:00:00-06 2 | Q2 2022 | 2022-05-01 00:00:00-05 3 | Q3 2022 | 2022-08-01 00:00:00-05 4 | Q4 2022 | 2022-11-01 00:00:00-05 (4 rows) ``` Before this change ------------------ > Cannot invoke "clojure.lang.IFn.invoke(Object)" because "to_period" is null (note, if you cannot reproduce this its because you haven't gotten https://github.com/metabase/metabase/pull/23346 in your local version which ensured errors always appear as errors on the frontend. java 11 has no message for NPE so the Frontend missed it was an error and displayed no results as if the query had succeeded) This was the case for the following scenarios: - "last1quarters" - "last1quarters~" - "thisquarter" - "next1quarters" - "next1quarters~" where the ~ means to include the current quarter. After this change ----------------- Running the queries against the custom table I made (current time is Jun 15, Q2) - "last1quarters": "Q1 2022" "February 1, 2022, 6:00 AM" - "last1quarters~": "Q1 2022" "February 1, 2022, 6:00 AM" | "Q2 2022" "May 1, 2022, 5:00 AM" - "thisquarter": "Q2 2022" "May 1, 2022, 5:00 AM" - "next1quarters" "Q3 2022" "August 1, 2022, 5:00 AM" - "next1quarters~": "Q2 2022" "May 1, 2022, 5:00 AM" | "Q3 2022" "August 1, 2022, 5:00 AM" And of course added tests into the matrix for the date parsing.
-
jkeys089 authored
* improved support for Google Cloud SQL * upgrade `postgres-socket-factory` and add license overrides * fix license check Co-authored-by:
Cam Saul <1455846+camsaul@users.noreply.github.com>
-
Braden Shepherdson authored
-
Dalton authored
* First pass at NumberWidget * Share styled components * Remove TokenField prop for now * Second pass * Add to ParameterValueWidget * Add placeholder text * Rename to NumberInputWidget * Only use new widget for field filter parameters for now * Fix placeholder * Fix button text * Fix placeholder text * Add unit tests * Fix type
-
Dalton authored
Fix unit tests Update name to match dashboard util fn name
-
Dalton authored
* refactor dashboard utils Fix e2e test * rmv unused arg
-
dpsutton authored
Want to return non-zero on unrecognized forms so that CI can indicate when forms are added that cannot be parsed. And example of a completely valid form of `trs` that we cannot identify with this code is ```clojure ;; from driver/util.clj (-> "Cycle detected resolving dependent visible-if properties for driver {0}: {1}" (trs driver cyclic-props) (ex-info {:type qp.error-type/driver :driver driver :cyclic-visible-ifs cyclic-props}) throw) ``` The string literal is threaded into the `trs` macro, so it validates correctly but we cannot identify the literal in tooling while making the pot file. Now output of bin/i18n/update-translation-template would be the following: ```shell ❯ ./update-translation-template [BABEL] Note: The code generator has deoptimised the styling of /Users/dan/projects/work/metabase/frontend/src/cljs/cljs.pprint.js as it exceeds the max of 500KB. [BABEL] Note: The code generator has deoptimised the styling of /Users/dan/projects/work/metabase/frontend/src/cljs/cljs-runtime/cljs.core.js as it exceeds the max of 500KB. [BABEL] Note: The code generator has deoptimised the styling of /Users/dan/projects/work/metabase/frontend/src/cljs/cljs.core.js as it exceeds the max of 500KB. ~/projects/work/metabase/bin/i18n ~/projects/work/metabase Warning: environ value /Users/dan/.sdkman/candidates/java/current for key :java-home has been overwritten with /Users/dan/.sdkman/candidates/java/17.0.1-zulu/zulu-17.jdk/Contents/Home SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". SLF4J: Defaulting to no-operation (NOP) logger implementation SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details. Created pot file at ../../locales/metabase-backend.pot Found 1396 forms for translations Grouped into 1313 distinct pot entries Found 1 forms that could not be analyzed {:file "metabase/driver/util.clj", :line 362, :original (trs driver cyclic-props), :message nil} ❯ echo $? 1 ``` and we have an exit code of 1 so that https://github.com/metabase/metabase/blob/master/.github/workflows/i18n.yml will fail in CI.
-
Mahatthana (Kelvin) Nomsawadi authored
-
Ryan Laurie authored
* allow chevron click
-
Alexander Polyankin authored
-
Benoit Vinay authored
-
Howon Lee authored
Pursuant to #22967. Previously the notion of the identifier in json-query in postgres assumed a singular identifier at the top-level of the Identifier record. This is not always the case in complicated binning scenarios - the identifier could also just comprise an entire tree of Identifier record maps with the actual Identifier we're looking to turn into the JSON query in some leaf somewhere. Therefore, the json-query's determination of what the identifier is now walks that identifier record tree and replaces the identifiers that have JSON field semantics with the reification of ToSql from json-query. Previous attempt at solution hacked together something at the json-query level, changing the reification, but that only worked for one level down, instead of just walking the Identifier tree and therefore getting stuff at arbitrary tree depth. And we do get nontrivial tree depth in the bucketing in #22967.
-
Benoit Vinay authored
* Convert Action to TypeScript * Delete possible unused ActionClick * Misc in Action * Misc * Delete Action files
-
- Jun 15, 2022
-
-
adam-james authored
* JWT shared key can now be any string. Message to suggest 64char key * Remove util require * We can now pass nice, readable multiline strings to tru/trs macros So let's do that here :)
-
Nemanja Glumac authored
-
Nemanja Glumac authored
* Fix the flake * Simplify the query * Use better assertion * Add an extra assertion
-
dpsutton authored
* Ensure :error is present for frontend The frontend checks for a string at "error" to determine if there's an error or not. Any error that lacks a message (`(.getMessage e) = nil`) will report as a successful query with no results. This was hard to reproduce at first because java 14+ added a nice error message to NPEs in [JEP-358](https://openjdk.org/jeps/358). ```java ;; java 11 jshell> HashSet x = null; x ==> null jshell> x.contains(3); | Exception java.lang.NullPointerException | at (#2:1) jshell> ;; java 17 jshell> HashSet x = null; x ==> null jshell> x.contains(3); | Exception java.lang.NullPointerException: Cannot invoke "java.util.HashSet.contains(Object)" because "REPL.$JShell$11.x" is null | at (#4:1) ``` ```clojure ;; java 17 catch-exceptions=> (let [x nil] (x 3)) Execution error (NullPointerException) at metabase.query-processor.middleware.catch-exceptions/eval130385 (REPL:41). Cannot invoke "clojure.lang.IFn.invoke(Object)" because "x" is null ;; java 11 catch-exceptions=> (let [x nil] (x 3)) Execution error (NullPointerException) at metabase.driver.sql.parameters.substitution/eval118508 (REPL:17). null ``` Here are the responses to the FE edited to the relevant bits: ```javascript // objects are edited for clarity/brevity: // from java-11 { "error_type": "qp", "status": "failed", "class": "class java.lang.NullPointerException", "stacktrace": [...], "error": null, // <---- the FE ignores all of the other data and only sees this } // vs java-17 { "error_type": "qp", "status": "failed", "class": "class java.lang.NullPointerException", "stacktrace": [...], "error": "Cannot invoke \"clojure.lang.IFn.invoke(Object)\" because \"to_period\" is null",, } ``` Also, note that we were still logging > ERROR middleware.catch-exceptions :: Error processing query: null because we were looking for `(:error format-exception)` instead of `(:error formatted-exception)`. `format-exception` is a multimethod and lookup on non-associative things will happily return nil. * Tests
-
Nemanja Glumac authored
-
Anton Kulyk authored
* Convert `initializeQB` to TypeScript * Extract parameter utils * Minor move * Simplify typings * Move cljs `normalize` to js file * Make optional parameter explicit
-
Aleksandr Lesnenko authored
-
Nemanja Glumac authored
* Run Percy (visual regression) sanity check on PRs using GHA * Run visual tests only once * Run Percy as an individual job * Fix whitespace error * Update name of the job
-
Anton Kulyk authored
-
Anton Kulyk authored
* Move initializeQB to its own file * Extensive test coverage for `initializeQB` action * Add tests for native questions with snippets * Extract `baseSetup` helper * Add coverage for blank questions * Fix missing coverage
-
Nemanja Glumac authored
-
Alexander Polyankin authored
-
Mahatthana (Kelvin) Nomsawadi authored
-
- Jun 14, 2022
-
-
Luis Paolini authored
-
metamben authored
* Use (str ...) forms to translate multi-line messages * Make H2 error messages refer to the correct field
-