Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Apr 09, 2021
    • Ariya Hidayat's avatar
      Fix subdimensions for a joined/FK dimension (#15530) · 574f84cc
      Ariya Hidayat authored
      This restores the behavior just like before MBQL field refactoring (back
      when the specialized class JoinedDimension and FKDimension still
      existed): the subdimensions for a joined/FK dimension are exactly those
      of the parent class, Dimension.dimensions(), and not more.  Also, each
      subdimension must still carry the join alias/source field option.
      574f84cc
  2. Apr 08, 2021
    • Nemanja Glumac's avatar
      Fix flakiness in `scatter` visualization tests (#15520) · 22d17fa2
      Nemanja Glumac authored
      - Fixes a flake in scatter.cy.spec.js that started appearing after throttle was introduced to the ExplicitSize component in #15235
      - Also fixes a flake with brush filter that apparently wasn't fully fixed in the previous attempt
      
      ## Additional Info:
      - Stress testing this fix in isolation with GitHub actions shows 20/20 runs passing :white_check_mark:
      - Stress testing "brush date filter" revealed that it still fails approximately 4-5x out of 20!
      
      - The reason seems to be that `mouseup` event doesn't always happen at the same time so the resulting filter doesn't have the same ending month every time (for example I've seen: "Created At between May, 2016 September, 2016", "Created At between May, 2016 July, 2016" and even "Created At between May, 2016 May, 2016")
      - It is more than enough that we assert that this filter exists in the first place so I changed the assertion to: `cy.contains(/^Created At between May, 2016/);` since the beginning of this string is the only thing we care about
      22d17fa2
  3. Apr 07, 2021
  4. Apr 06, 2021
  5. Apr 05, 2021
  6. Apr 04, 2021
  7. Apr 02, 2021
    • Cam Saul's avatar
    • dpsutton's avatar
      Throw an error if a setting already exists (#15359) · 17ccd713
      dpsutton authored
      * Throw an error if a setting already exists
      
      ```clojure
      setting-test=> (defsetting site-name (deferred-tru "A testing setting") :visibility :public)
      Execution error (ExceptionInfo) at metabase.models.setting/register-setting! (setting.clj:464).
      Setting :site-name already registered in metabase.public-settings
      setting-test=> (pprint (ex-data *e))
      {:existing-setting
       {:description "The name used for this instance of Metabase.",
        :cache? true,
        :default "Metabase",
        :name :site-name,
        :type :string,
        :sensitive? false,
        :tag java.lang.String,
        :namespace metabase.public-settings,
        :visibility :admin}}
      nil
      ```
      
      * Tests in ci are run from user
      
      * Appease eastwood; don't shadow function `setting-name`
      
      this pattern is exactly what the helpful protocol does. i actually
      wanted to call that protocol but it throws an error if it doesn't
      exist which is a bit much for our purposes
      
      * Move namespace name into setting information
      17ccd713
    • Paul Rosenzweig's avatar
    • Tim Macdonald's avatar
    • Jeff Evans's avatar
      Only attempt to sync schemas that have some/any possible permissions (#15291) · e8c347b8
      Jeff Evans authored
      Only attempt to sync schemas that have some/any possible permissions
      
      Make syncable-schemas multimethod, whose base implementation is the same as the previous private fn
      
      Override syncable-schemas for Redshift to add a filtering step to the transducer pipeline to check for the schema privilege, by calling the HAS_SCHEMA_PRIVILEGE Redshift function to check for USAGE permission
      
      Making all-schemas function public since it's now invoked from the Redshift driver
      
      Fixing redshift-types-test to remove order flakiness
      
      Adding test that confirms that a real schemas with no permissions aren't synced
      e8c347b8
    • dpsutton's avatar
      Put schema forms in meta for schemas (#15325) · b7ca7e5d
      dpsutton authored
      ```clojure
      schema=> (->> (ns-publics 'metabase.mbql.schema)
                    (keep (fn [[s v]] (:clause-form (meta v))))
                    (run! pprint))
      
      [:not-null :field Field]
      [:interval :n s/Int :unit RelativeDatetimeUnit]
      [:regex-match-first :s StringExpressionArg :pattern s/Str]
      [:var :field-or-expression FieldOrExpressionDef]
      [:does-not-contain
       :field
       StringExpressionArg
       :string-or-field
       StringExpressionArg
       :options
       (optional StringFilterOptions)]
      [:= :field EqualityComparable :value-or-field EqualityComparable :more-values-or-fields (rest EqualityComparable)]
      [:log :x NumericExpressionArg]
      [:< :field OrderComparable :value-or-field OrderComparable]
      [:floor :x NumericExpressionArg]
      [:metric :metric-id (s/cond-pre helpers/IntGreaterThanZero helpers/NonBlankString)]
      [:ends-with :field StringExpressionArg :string-or-field StringExpressionArg :options (optional StringFilterOptions)]
      [:relative-datetime :n (s/cond-pre (s/eq :current) s/Int) :unit (optional RelativeDatetimeUnit)]
      [:sum :field-or-expression FieldOrExpressionDef]
      [:time-interval
       :field
       field
       :n
       (s/cond-pre s/Int (s/enum :current :last :next))
       :unit
       RelativeDatetimeUnit
       :options
       (optional TimeIntervalOptions)]
      [:rtrim :s StringExpressionArg]
      [:ceil :x NumericExpressionArg]
      [:starts-with :field StringExpressionArg :string-or-field StringExpressionArg :options (optional StringFilterOptions)]
      [:<= :field OrderComparable :value-or-field OrderComparable]
      [:upper :s StringExpressionArg]
      [:* :x NumericExpressionArg :y NumericExpressionArg :more (rest NumericExpressionArg)]
      [:min :field-or-expression FieldOrExpressionDef]
      [:inside
       :lat-field
       OrderComparable
       :lon-field
       OrderComparable
       :lat-max
       OrderComparable
       :lon-min
       OrderComparable
       :lat-min
       OrderComparable
       :lon-max
       OrderComparable]
      [:ltrim :s StringExpressionArg]
      [:desc :field FieldOrAggregationReference]
      [:contains :field StringExpressionArg :string-or-field StringExpressionArg :options (optional StringFilterOptions)]
      [:expression :expression-name helpers/NonBlankString]
      [:is-empty :field Field]
      [:substring :s StringExpressionArg :start NumericExpressionArg :length (optional NumericExpressionArg)]
      [:stddev :field-or-expression FieldOrExpressionDef]
      [:> :field OrderComparable :value-or-field OrderComparable]
      [:replace :s StringExpressionArg :match s/Str :replacement s/Str]
      [:sqrt :x NumericExpressionArg]
      [:concat :a StringExpressionArg :b StringExpressionArg :more (rest StringExpressionArg)]
      [:count-where :pred Filter]
      [:- :x NumericExpressionArg :y NumericExpressionArgOrInterval :more (rest NumericExpressionArgOrInterval)]
      [:asc :field FieldOrAggregationReference]
      [:cum-count :field (optional Field)]
      [:value :value s/Any :type-info (s/maybe ValueTypeInfo)]
      [:or
       :first-clause
       (s/recursive #'Filter)
       :second-clause
       (s/recursive #'Filter)
       :other-clauses
       (rest (s/recursive #'Filter))]
      [:exp :x NumericExpressionArg]
      [:time :time (s/cond-pre java.time.LocalTime java.time.OffsetTime) :unit TimeUnit]
      [:between :field OrderComparable :min OrderComparable :max OrderComparable]
      [:sum-where :field-or-expression FieldOrExpressionDef :pred Filter]
      [:not :clause (s/recursive #'Filter)]
      [:cum-sum :field-or-expression FieldOrExpressionDef]
      [:coalesce :a ExpressionArg :b ExpressionArg :more (rest ExpressionArg)]
      [:is-null :field Field]
      [:/ :x NumericExpressionArg :y NumericExpressionArg :more (rest NumericExpressionArg)]
      [:>= :field OrderComparable :value-or-field OrderComparable]
      [:not-empty :field Field]
      [:distinct :field-or-expression FieldOrExpressionDef]
      [:percentile :field-or-expression FieldOrExpressionDef :percentile NumericExpressionArg]
      [:round :x NumericExpressionArg]
      [:power :x NumericExpressionArg :y NumericExpressionArg]
      [:aggregation-options :aggregation UnnamedAggregation :options AggregationOptions]
      [:+ :x NumericExpressionArg :y NumericExpressionArgOrInterval :more (rest NumericExpressionArgOrInterval)]
      [:abs :x NumericExpressionArg]
      [:median :field-or-expression FieldOrExpressionDef]
      [:share :pred Filter]
      [:case :clauses CaseClauses :options (optional CaseOptions)]
      [:segment :segment-id (s/cond-pre helpers/IntGreaterThanZero helpers/NonBlankString)]
      [:max :field-or-expression FieldOrExpressionDef]
      [:!= :field EqualityComparable :value-or-field EqualityComparable :more-values-or-fields (rest EqualityComparable)]
      [:count :field (optional Field)]
      [:lower :s StringExpressionArg]
      [:length :s StringExpressionArg]
      [:trim :s StringExpressionArg]
      [:and
       :first-clause
       (s/recursive #'Filter)
       :second-clause
       (s/recursive #'Filter)
       :other-clauses
       (rest (s/recursive #'Filter))]
      [:avg :field-or-expression FieldOrExpressionDef]
      [:aggregation :aggregation-clause-index s/Int]
      nil
      schema=>
      ```
      b7ca7e5d
    • Nemanja Glumac's avatar
      Fix failing smoke tests in CI (#15461) · d95b8cae
      Nemanja Glumac authored
      d95b8cae
    • Luis Paolini's avatar
      Show currency list in native queries and add Kyrgyz Som (#15457) · 24efaeae
      Luis Paolini authored
      * Add Kyrgyz Som to currency list
      
      * Show currency selector in Native Queries
      24efaeae
    • Nemanja Glumac's avatar
      Turn on `eslint-react/prop-types` rule and make it error out for new files (#15450) · fb3b85f7
      Nemanja Glumac authored
      * Switch the rule to "error"
      
      * Disable linting for `prop-types` in unit tests
      
      * Disable linting for `prop-types` in all affected files
      fb3b85f7
    • Nemanja Glumac's avatar
      Upgrade Cypress to v6.8.0 (latest) (#15451) · 4f7e5672
      Nemanja Glumac authored
      * Upgrade Cypress to v6.8.0 (latest)
      
      * Fix failing test in CI
      
      * Fix the problem where Cypress does not render Nav bar locally
      
      More info:
      - https://www.eliostruyf.com/tests-running-iframe-cypress-e2e-tests/
      - https://docs.cypress.io/faq/questions/using-cypress-faq#Is-there-any-way-to-detect-if-my-app-is-running-under-Cypress
      4f7e5672
    • Robert Roland's avatar
      Drop maxIdleTimeExcessConnections (#15388) · 52ca91e4
      Robert Roland authored
      To address connection pools that go beyond the maxPoolSize of 15, reduce
      the maxIdleTimeExcessConnections so it'll start to pare back the pool
      towards minPoolSize sooner.
      
      See swaldman/c3p0#65 for an explanation.
      
      Resolves metabase/metabase#8679
      52ca91e4
    • Howon Lee's avatar
      flambers thing is a much better idea (#15428) · 855d07a3
      Howon Lee authored
      855d07a3
Loading