Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Feb 27, 2023
  2. Feb 26, 2023
  3. Feb 25, 2023
  4. Feb 24, 2023
    • Aleksandr Lesnenko's avatar
    • Aleksandr Lesnenko's avatar
      tweak the row chart style (#28626) · b2780b0d
      Aleksandr Lesnenko authored
      Unverified
      b2780b0d
    • Nick Fitzpatrick's avatar
      open chart settings when clicking active display type (#28613) · 9c9c7ec1
      Nick Fitzpatrick authored
      * open chart settings when clicking active display type
      
      * adjusting tendline e2e test
      Unverified
      9c9c7ec1
    • dpsutton's avatar
      Remove exploded json fields in implicit actions (#28558) · 5a81d35d
      dpsutton authored
      * Remove json fields from action parameters
      
      ```sql
      json-test=# select * from json_table;
           json_val     |  description
      ------------------+---------------
       {"a": 1, "b": 2} | a description
      (1 row)
      ```
      
      This ends up in our db as:
      
      ```clojure
      ({:database_type "json",
        :name "json_val",
        :effective_type :type/Structured,
        :nfc_path nil,
        :id 73,
        :display_name "Json Val",
        :database_required true}
       {:database_type "bigint",
        :name "json_val → a",
        :effective_type :type/Integer,
        :nfc_path ("json_val" "a"),
        :id 72,
        :display_name "Json Val → A",
        :database_required false}
       {:database_type "bigint",
        :name "json_val → b",
        :effective_type :type/Integer,
        :nfc_path ("json_val" "b"),
        :id 74,
        :display_name "Json Val → B",
        :database_required false}
       {:database_type "text",
        :name "description",
        :effective_type :type/Text,
        :nfc_path nil,
        :id 13670,
        :display_name "Description",
        :database_required false})
      ```
      
      AKA, exploded. But we cannot enter values for these fields for implicit
      actions. Before this change, the action thought its parameters were:
      
      ```clojure
       :parameters ({:id "json_val",
                     :target [:variable [:template-tag "json_val"]],
                     :type :type/Structured,
                     :required true}
                    {:id "json_val_%E2%86%92_a",
                     :target [:variable
                              [:template-tag "json_val_%E2%86%92_a"]],
                     :type :type/Integer,
                     :required false}
                    {:id "json_val_%E2%86%92_b",
                     :target [:variable
                              [:template-tag "json_val_%E2%86%92_b"]],
                     :type :type/Integer,
                     :required false}
                    {:id "description",
                     :target [:variable [:template-tag "description"]],
                     :type :type/Text,
                     :required false})
      ```
      
      And we just don't know how to handle the exploded json values in the
      insert statement to create a nested json structure. So lets omit
      them. After this change:
      
      ```clojure
      action=> (:parameters (select-action :id 14))
      ({:id "json_val",
        :target [:variable [:template-tag "json_val"]],
        :type :type/Structured,
        :required true}
       {:id "description",
        :target [:variable [:template-tag "description"]],
        :type :type/Text,
        :required false})
      ```
      
      * Translate `:type/Structured` to JSON for pg
      
      Fields have effective_type, and base_type `:type/Structured`. But
      several other types get marked as this as well:
      
      ```clojure
      actions=> (descendants :type/Structured) -> #{:type/SerializedJSON :type/XML :type/JSON}
      ```
      
      So for the purposes of this, we _assume_ that structured is synonymous
      with json. Certainly will error if its xml. This makes the implicit
      action cast the text input for a json field to json. If the underlying
      field in pg is jsonb the driver cleans that up for us with no error.
      
      * Remove json fields, exploded json fields, unrecognized type fields
      
      In order to do this, had to change how we load json fields in test
      datasets for postgres. It just stuffed them in as text. Mysql would
      correctly make them json fields but postgres just bailed and left them
      as text strings.
      
      This changes `load-data/load-data!` to look for json columns, and if so,
      cast them to json when loading.
      
      * Remove json and xml checks from dashboard execution tests
      
      these are not doing what you think they are doing. they inspire
      confidence that json works but the underlying fields are actually always
      text. So it's unfounded confidence; misleading confidence.
      
      If you fix this, you quickly run into issues with expressivity in
      parameters and differences in dbs. A few:
      - no parameter on a dashboard can express that its type is json
      - mysql doesn't have an xml type
      - postgres does have an xml type, and you get back a native PGXML type
      - since you can't have an implicit type in the parameter, each sql has
      to cast in its query. And then you start getting differences in return
      types, queries, and it stops making sense for this all to be in the same
      query.
      
      And at the end of the day, of course you can write a query that casts a
      string to some native type. That's not really action related.
      
      * Let's not do this yet
      
      i think this is the correct call but want more tests on it when we flip
      the switch
      
      * Test pg enums in implicit actions
      
      * alignment and unused binding
      
      * Exclude in maria
      
      maria doesn't see the json_bit field as a json column. It's just a text
      column. So it is not excluded and all of the exploded fields like
      "json_bit → 1234" are not extracted. So this test is not applicable
      because it's just a generic implicit action on three fields.
      
      * accept suggestions from tamas
      Unverified
      5a81d35d
    • Emmad Usmani's avatar
    • Nick Fitzpatrick's avatar
      adding delay to typing (#28620) · 7b8675fb
      Nick Fitzpatrick authored
      Unverified
      7b8675fb
    • metamben's avatar
    • Bryan Maass's avatar
      fixes nil schema being passed into ->malli-io-link (#28542) · eab2af99
      Bryan Maass authored
      * fixes nil schema being passed into ->malli-io-link
      
      - happens when function args aren't annotated.
      
      * (u/pprint-to-str nil) should be "nil\n", not nil
      Unverified
      eab2af99
    • Cam Saul's avatar
      Mark `hx/` and `h1x/` namespaces and their vars as deprecated (#28316) · 0c566648
      Cam Saul authored
      * Mark `hx/` and `h1x/` namespaces and their vars as deprecated
      
      * Fix snowflake failures
      
      * Remove unneeded honey-sql-version bindings
      Unverified
      0c566648
    • metamben's avatar
      Unskip E2E repro for #25988 (#28562) · a7e76399
      metamben authored
      
      * Unskip repro e2e test
      
      * Fix flaky test
      
      ---------
      
      Co-authored-by: default avatarNemanja <31325167+nemanjaglumac@users.noreply.github.com>
      Unverified
      a7e76399
    • Cal Herries's avatar
      Whitelist H2 commands for actions (#28583) · 32adcb1d
      Cal Herries authored
      
      * Decouple checking ddl from classifying h2 stmts
      
      - should enable followup for easily blocking more kinds of queries
      - check all statements to make sure they aren't "ddl".
      
      * fix classify-query
      
      * linter fixes + get-field refactor
      
      * return the CommandInterface values as ints
      
      Reach into the CommandList when needed
      
      * docstring wording
      
      * catch invalid queries -- they can't be classified
      
      * Remove action subtypes from inlined-models
      
      * Add ddl check for `execute-write-query!`
      
      * Remove ACCESS_MODE_DATA
      
      * Check queries are single select statements
      
      * Add test for sample database privileges
      
      * Fix single-select check
      
      * Add single-select test
      
      * Rename and add more tests for checking read only commands
      
      * commands -> statements
      
      * Fix check-disallow-ddl-commands
      
      * new line
      
      * Add more read-only statements to the tests
      
      * Update error text
      
      * Use are
      
      * Add integration test for executing actions with disallowed commands
      
      * Add test before inserting row
      
      * Run GRANT ALL ON SCHEMA "PUBLIC" TO GUEST
      
      * Restore classify-query
      
      * whitespace
      
      * Whitelist command types for actions
      
      * Add comment
      
      * Rename
      
      * Remove dupes
      
      * Add truncate test
      
      * Add DDL commands
      
      * Rename to query-classification
      
      * Update error message
      
      * Fix test
      
      ---------
      
      Co-authored-by: default avatarBryan Maass <bryan.maass@gmail.com>
      Unverified
      32adcb1d
    • Denis Berezin's avatar
      Expose median aggregation for supported DBs (#28526) · 6265ac4f
      Denis Berezin authored
      Add Median aggregation type to query builder aggregation dropdown menu for databases that support "percentile-aggregations" driver feature.
      
      Also:
      Add translation tag for numeric column "Style| dropdown settings
      Unverified
      6265ac4f
    • Nemanja Glumac's avatar
    • Nemanja Glumac's avatar
      [Ci] Fix rerun workflow (#28605) · 277c1437
      Nemanja Glumac authored
      Unverified
      277c1437
    • Nemanja Glumac's avatar
      [E2E] Fix x-ray flake (#28604) · ad8a8982
      Nemanja Glumac authored
      Unverified
      ad8a8982
    • Nemanja Glumac's avatar
      [E2E] Fix explicit joins dashboard filters flake (#28600) · d1f9fd44
      Nemanja Glumac authored
      * Limit the number of results for better performance
      
      * Wait for all filter results to load
      
      * Remove the need for popover
      Unverified
      d1f9fd44
    • Ngoc Khuat's avatar
    • Nemanja Glumac's avatar
      [E2E] Fix model-revision-history flake (#28597) · d97e01f6
      Nemanja Glumac authored
      * Wait for model to fully load
      
      * Open revision history helper
      
      * Revert to a point in history helper
      
      * Greatly simplify test
      
      Do not test things out we're covering elsewhere
      
      * Update test title to match the assertions
      Unverified
      d97e01f6
    • Nemanja Glumac's avatar
      [CI] Run Frontend and Drivers tests on Ubuntu 22.04 (#28591) · 7f2932a0
      Nemanja Glumac authored
      * [CI] Run frontend and drivers tests on Ubuntu 22.04
      
      * Skip capturing max memory usage for now
      Unverified
      7f2932a0
    • Ryan Laurie's avatar
      Fallback to generating action form fields from parameters (#28512) · 88aa0fab
      Ryan Laurie authored
      * fallback to generating form metadata from parameters
      
      * fix actions test
      
      * update unit tests
      
      * update e2e test strings
      Unverified
      88aa0fab
    • Nemanja Glumac's avatar
  5. Feb 23, 2023
Loading