Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Mar 02, 2021
    • Jeff Evans's avatar
      Switch native query execution to use Statement instead of PreparedStatement (#14883) · a9bbb494
      Jeff Evans authored
      Switch query execution to use `Statement` instead of `PreparedStatement` when there are no params
      
      Add new multimethod to create a `Statement`, rather than `PreparedStatement`, which works similarly, called `statement`
      
      Add new multimethod to run a SQL query against a Statement, similar to `execute-query!`, called `execute-statement!`
      
      For consistency, rename `execute-query!` to `execute-prepared-statement!`
      
      Change `execute-reducible-query` to capture whether the query has params, and if not, using the new multimethods instead
      
      Update fetch-results-metadata-test so it replaces execute-select! instead of prepared-statement
      
      Adding `statement-supported?` multimethod (defaults to true), to let drivers control whether statements are used at all
      
      Updating Oracle driver to not override holdability for `statement`, similar to `prepared-statement`, and bumping module version
      
      Updating SparkSQL driver to indicate that statements are not supported, and bumping module version
      
      Fixing Redshift test to also override `execute-statement!` so it can capture the SQL for a statement
      Unverified
      a9bbb494
  2. Mar 01, 2021
    • Dalton's avatar
    • Nemanja Glumac's avatar
    • Robert Roland's avatar
      Adding the ability to sync admin groups in EE (#14993) · 391c4eb9
      Robert Roland authored
      
      * Adding the ability to sync admin groups in EE
      
      Adds a LDAP setting for EE to enable to LDAP Administrator group syncs.
      
      Adds the setting to admin UI to enable syncing of the admin group.
      
      Removes two unused settings from the OSS side.
      
      metabase/metabase-enterprise#445
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarDalton <daltojohnso@users.noreply.github.com>
      
      Co-authored-by: default avatarDalton <daltojohnso@users.noreply.github.com>
      Unverified
      391c4eb9
    • Jeff Evans's avatar
      Upgrade HoneySQL version to latest in 1.x line (#14934) · bcdcab21
      Jeff Evans authored
      Modifying ddl.clj to account for a difference in behavior for honeysql.helpers/columns introduced in honeysql 0.9.7 (see long comment)
      Unverified
      bcdcab21
    • Tim Macdonald's avatar
      Blended score for sorting (#15009) · 937c542b
      Tim Macdonald authored
      * Combine search scores into one weighted number
      
      * Use richer representation of scores
      
      Should make the FE debugging bits more robust
      Unverified
      937c542b
    • Nemanja Glumac's avatar
      Upgrade React to v16 (#14391) · 28ce196d
      Nemanja Glumac authored
      
      * Upgrade React to v16
      
      * Upgrade react-hot-loader
      
      * Use portal in BodyComponent (#14779)
      
      * Use portal in Popover (#14799)
      
      * Use portal in Popover
      
      * Use SandboxedPortal to stop portal child/parent event propagation
      
      React portals bubble events from component childrent to component
      parents _through_ the portal as though they are attached. This breaks
      our Triggerable HOC that wraps everything in an anchor tag -- click
      events inside of an open Popover trigger the "toggle" function in
      Triggerable, closing the Popover component.
      
      Adding an additional div to the code potentially breaks styling, but
      this seemed better than the alternative of changing/limiting
      Triggerable.
      
      * Fix adding of open class
      
      * don't trigger some logic when popover is not open
      
      * change wrapper span to a div
      
      * rmv explicit bind from handleDismissal fn
      
      * add comment explaining reasoning for SandboxedPortal
      
      * add comment to explain need for 'maxHeight' state value
      
      * Use ReactDOMServer to render html in a contenteditable div (#14869)
      
      As part of the react v16 we can no longer rely on a synchronous
      ReactDOM.render call. Using the third arg callback of ReactDOM.render
      does not work for reasons unknown to me, but it would likely be
      race-condition-y anyways due to this being an input field. I'm using
      ReactDOMServer in order to avoid rewriting the react TokenizedExpression
      component as html and to avoid associated xss vulnerabilities, etc.
      
      * Rename unsafe lifecycles (#14887)
      
      * Rename unsafe lifecycles
      
      * Fix flow error: Remove unused suppressions
      
      * use SandboxedPortal in Modal (#14905)
      
      * use SandboxedPortal in Modal
      
      * Move modal append container to constructor
      
      This breaks the entry animation but it fixes problems with having a
      popover _inside_ of the modal. Previously, popover was appending its
      container el before the modal, causing a stacking issue.
      
      * remove unstable_renderSubtreeIntoContainer from Tooltip (#14976)
      
      Co-authored-by: default avatarDalton <daltojohnso@users.noreply.github.com>
      Unverified
      28ce196d
    • Tim Macdonald's avatar
      Add recency score to search (#14987) · 5b32c0fa
      Tim Macdonald authored
      Unverified
      5b32c0fa
    • Cam Saul's avatar
      Fix MongoDB test failures :wrench: (#15012) · ff7adcfe
      Cam Saul authored
      Unverified
      ff7adcfe
    • Kyle Doherty's avatar
      Search/item UI fixes (#14975) · f4232138
      Kyle Doherty authored
      * fix default SearcbResult item layout and icon shrinking
      
      * tweak text
      Unverified
      f4232138
  3. Feb 26, 2021
  4. Feb 25, 2021
    • Cam Saul's avatar
      Optimize relative datetime filters (#14835) · 538e5e38
      Cam Saul authored
      1. Rename optimize-datetime-filters middleware -> optimize-temporal-filters (it's more accurate, because this also
      optimizes date or time filter clauses)
      
      2. optimize-temporal-filters middleware now optimizes relative-datetime clauses (which represent a moment in time
      relative to when the query is ran, e.g. "last month") in addition to absolute-datetime clauses (which represent an
      absolute moment in time, e.g. 2021-02-15T14:40:00-08:00) . This middleware rewrites queries so we filter against
      specific temporal ranges without casting the column itself, meaning we can leverage indexes on that column. See #11837
      for more details
      
      3. Added new validate-temporal-bucketing middleware that throws an Exception if you try to do something that makes no
      sense, e.g. bucket a DATE field by :time or a TIME field by :month. This is a better situation then running the query
      and waiting for the DB to complain. (In practice, I don't think the FE client would let you generate a query like this
      in the first place)
      
      4. Fix random test failures for MySQL in task-history-cleanup-test
      Unverified
      538e5e38
    • Jeff Evans's avatar
      Implement ssh tunnel reconnection (#14563) · b4d8e35a
      Jeff Evans authored
      * Implement ssh tunnel reconnection
      
      From the connection-with-timezone method of execute, check whether an ssh tunnel that should be open actually is not, and if so, mark the entire pool as invalid (thereby forcing the connection code to rebuild the source and open a new tunnel)
      
      Fixing the create-pool! function so that the relevant ssh tunnel entries are kept (in addition to the :datasource)
      
      Adding test in ssh-test namespace, which will test that the tunnel is reestablished (for now, running with Postgres driver)
      
      * Responding to PR feedback from Dan
      
      * Fixing test by adding AcceptAllForwardingFilter forwardingFilter to the mock password server instance
      
      * Change with-driver to test-driver
      
      * Add ssh tunnel reconnect test that can run against H2
      
      * Implement ssh tunnel reconnection
      
      From the connection-with-timezone method of execute, check whether an ssh tunnel that should be open actually is not, and if so, mark the entire pool as invalid (thereby forcing the connection code to rebuild the source and open a new tunnel)
      
      Fixing the create-pool! function so that the relevant ssh tunnel entries are kept (in addition to the :datasource)
      
      Adding test in ssh-test namespace, which will test that the tunnel is reestablished (for now, running with Postgres driver)
      
      * Responding to PR feedback from Dan
      
      * Fixing test by adding AcceptAllForwardingFilter forwardingFilter to the mock password server instance
      
      * Rebase again to fix merge conflict
      
      * Change test-driver to with-driver in hopes of making CodeCov finally happy
      
      * Adding new multimethod to ssh namespace, called incorporate-ssh-tunnel-details, for accounting for the
      
      Implementing incorporate-ssh-tunnel-details for h2 so update the URI string (:db key) to point to the tunnel entry point
      
      Pulled logic for :sql-jdbc implementation of connection-with-timezone out to a new fn, so it can be called elsewhere
      
      Updating H2 reconnection test imn light of the changes above
      
      Added "!" suffix to name of include-ssh-tunnel to reflect the fact that it does modify global state
      
      * Fixing NPE in incorporate-ssh-tunnel-details implementation for :h2
      
      Moving multimethod declaration for incorporate-ssh-tunnel-details to driver namespace
      
      * Fix :h2 implementation again
      
      * Remove another errant extra line :(
      
      * Rebase onto master
      
      * Inline the private helper fn back into connection-with-timezone
      
      * Remove dead code
      Unverified
      b4d8e35a
    • Cam Saul's avatar
      MBQL Refactor: Combine various Field clauses into one new clause (#14897) · 6bdd5e09
      Cam Saul authored
      Background
      
      The original version of MBQL (known as the "Structured Query" language at the time, which was a little confusing) just referred to all fields by integer ID. e.g.
      
      {:filter ["STARTS_WITH" 1 "abc"]}
      That made clauses like this ambiguous:
      
      {:filter ["=" 1 2]} ; is 2 a Field, or the number 2?
      To clear up ambiguity and to let you filter Fields against Fields, we added the :field-id clause to make it explicit that you were referring to a Field, not an Integer:
      
      {:filter [:= [:field-id 1] [:field-id 2]]} ; Field 1 == Field 2
      We soon added a couple of new types of Field clauses, :fk-> and :datetime-field, both of which wrap the original :field-id:
      
      ;; refer to Field 2 from a different Table, use Field 1 from the current Table to perform the join
      [:fk-> [:field-id 1] [:field-id 2]]
      
      ;; bucket Field 3 by month
      [:datetime-field [:field 3] :month]
      So far things were still pretty reasonable, the worst you'd have to do is something like
      
      [:datetime-field [:fk-> [:field-id 1] [:field-id 2]] :month]
      Things started to get out-of-hand IMO when we continued to add more Field clause types that just wrapped everything else. We added :binning-strategy:
      
      [:binning-strategy <field> :num-buckets 10]
      then :field-literal, to refer to a Field from a nested native source query:
      
      [:field-literal "my_field" :type/Text]
      then we added :joined-field to specify the Table you're explicitly joining against that is the source of a Field:
      
      [:joined-field "my_join" [:field-id 4]]
      This ends up getting really hairy when you combine things. This is an actual real clause you can use right now:
      
      [:binning-strategy
       [:datetime-field
        [:joined-field "my_join"
         [:field-literal "my_field" :type/DateTimeWithLocalTZ]]
        :month]
       :num-bins 10]
      And even with all of those clauses, we still can't pass around arbitrary extra information in a way that would make it easy to implement performance optimizations. If we ever try to add another new clause, the whole house of cards is going to come crashing down.
      
      The proposal
      Combine all of the Field clauses into a single new :field clauses with the schema
      
      [:field id-or-name options-map]
      Here are some before & after examples:
      
      [:field-id 1] 
      => 
      [:field 1 nil]
      
      [:field-literal "my_field" :type/Text] 
      => 
      [:field "my_field" {:base-type :type/Text}]
      
      [:datetime-field [:field 1] :month] 
      => 
      [:field 1 {:temporal-unit :month}]
      
      [:binning-strategy [:field 1] :num-bins 10] 
      =>
      [:field 1 {:binning {:strategy :num-bins, :num-bins 10}}]
      
      [:joined-field "my_join" [:field 1]] 
      => 
      [:field 1 {:join-alias "my_join}]
      
      [:fk-> [:field 1] [:field 2]] 
      => 
      [:field 2 {:source-field 1}]
      
      [:binning-strategy
       [:datetime-field
        [:joined-field "my_join"
         [:field-literal "my_field" :type/DateTimeWithLocalTZ]]
        :month]
       :num-bins 10]
      =>
      [:field "my_field" {:base-type :type/DateTimeWithLocalTZ, :join-alias "my_join", :binning {:strategy :num-bins, :num-bins 10}}]
      Unverified
      6bdd5e09
    • Tim Macdonald's avatar
      Search: Use number of occurrences in a dashboard (#14946) · 65e3ba19
      Tim Macdonald authored
      * Use dashboard count in search scoring
      
      [Fixes #14945]
      
      * Fix sorting priority bug
      
      (thanks, Dan!)
      
      * Show (hidden) scores in search results for debugging purposes
      
      * Bump memory limit for SQL Server on CI
      
      c.f. https://metaboat.slack.com/archives/C5XHN8GLW/p1614272426000400
      Unverified
      65e3ba19
    • Kyle Doherty's avatar
      Add styling for "no results found" in the type ahead search box (#14958) · ca429576
      Kyle Doherty authored
      * basic no results styling
      
      * tweaks
      Unverified
      ca429576
    • Tim Macdonald's avatar
      Change the sorting order of models (#14966) · a7d62dad
      Tim Macdonald authored
      Per Kyle's suggestion
      Unverified
      a7d62dad
    • Ariya Hidayat's avatar
  5. Feb 24, 2021
  6. Feb 23, 2021
  7. Feb 22, 2021
  8. Feb 19, 2021
  9. Feb 18, 2021
  10. Feb 17, 2021
  11. Feb 16, 2021
Loading