Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Oct 27, 2023
  2. Oct 26, 2023
    • dpsutton's avatar
      Suppress some route logs on startup (#35120) · 19f6d315
      dpsutton authored
      Annoying warnings on startup
      
      ;#### Before
      
      ```shell
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/rule/:prefix/:dashboard-template [prefix Prefix]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/rule/:prefix/:dashboard-template [dashboard-template DashboardTemplate]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/cell/:cell-query [cell-query Base64EncodedJSON]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:dashboard-template [prefix Prefix]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:dashboard-template [dashboard-template DashboardTemplate]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:dashboard-template [cell-query Base64EncodedJSON]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/rule/:prefix/:dashboard-template/compare/:comparison-entity/:comparison-entity-id-or-query [prefix Prefix]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/rule/:prefix/:dashboard-template/compare/:comparison-entity/:comparison-entity-id-or-query [dashboard-template DashboardTemplate]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/cell/:cell-query/compare/:comparison-entity/:comparison-entity-id-or-query [cell-query Base64EncodedJSON]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:dashboard-template/compare/:comparison-entity/:comparison-entity-id-or-query [prefix Prefix]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:dashboard-template/compare/:comparison-entity/:comparison-entity-id-or-query [dashboard-template DashboardTemplate]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:entity/:entity-id-or-query/cell/:cell-query/rule/:prefix/:dashboard-template/compare/:comparison-entity/:comparison-entity-id-or-query [cell-query Base64EncodedJSON]
       Either add :fn to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:key [key kebab-cased-keyword]
       Either add :keyword to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:key [key kebab-cased-keyword]
       Either add :keyword to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:zoom/:x/:y/:lat-field/:lon-field [lat-field :string]
       Either add :string to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
       Warning: missing route-param regex for schema: /:zoom/:x/:y/:lat-field/:lon-field [lon-field :string]
       Either add :string to metabase.api.common.internal/->matching-regex or metabase.api.common.internal/no-regex-schemas.
      ```
      
      ;#### After
      
      ;#### Fixes
      
      ;###### :fn
      
      We logged lots of startups that we didn't have a regex for the `:fn` type validator in routes. And this is generally not possible. So we should generally just ignore function based validators, as we're not going to write a regex for what a function validates/accepts. All of these `:fn` matchers are in the x-ray namespace matching base64 encoded json, an existing dashboard template prefix (`(malli.core/validate Prefix "TransactionTable")`),
      
      ;###### `:keyword`: Add a regex `#"[\S]+"` that just looks for non space characters
      
      ;###### String matches `:string`
      
      ```clojure
      (def ^:private kebab-cased-keyword
        "Keyword that can be transformed from \"a_b\" -> :a-b"
        [:keyword {:decode/json #(keyword (u/->kebab-case-en %))}])
      
      ...
      
      (api/defendpoint GET "/:key"
        "Fetch a single `Setting`."
        [key]
        {key kebab-cased-keyword}
        (with-setting-access-control
          (setting/user-facing-value key)))
      ```
      
      We don't want a regex for this. Whatever we are currently accepting in the route matching is our desired behavior. Arbitrary strings don't have a good regex and we don't want to restrict what the route currently does.
      
      ```clojure
      (api/defendpoint GET "/:zoom/:x/:y/:lat-field/:lon-field"
        "This endpoints provides an image with the appropriate pins rendered given a MBQL `query` (passed as a GET query
        string param). We evaluate the query and find the set of lat/lon pairs which are relevant and then render the
        appropriate ones. It's expected that to render a full map view several calls will be made to this endpoint in
        parallel."
        [zoom x y lat-field lon-field query]
        {zoom        ms/Int
         x           ms/Int
         y           ms/Int
         lat-field   :string
         lon-field   :string
         query       ms/JSONString} ...)
      ```
      Unverified
      19f6d315
    • Oisin Coveney's avatar
    • Denis Berezin's avatar
      Fix entities fetch caching (#34661) · adb2df0c
      Denis Berezin authored
      * Fix entities fetch caching
      
      * Add proper unit test, fix loop issue
      
      * Review fixes, unit test fix
      Unverified
      adb2df0c
    • lbrdnk's avatar
      Support interval subtraction in expressions (#34752) · 25d7129c
      lbrdnk authored
      * Update sql qp to handle interval subtraction
      
      * Update tests checking interval subtraction
      
      * Transform assertions to exceptions
      Unverified
      25d7129c
    • Cam Saul's avatar
    • Case Nelson's avatar
    • Jeff Bruemmer's avatar
      Unverified
      eee20fce
    • Maz Ameli's avatar
      Revise the copy and tests for for the "don't lose your changes" confirmation modal (#34995) · b6b396de
      Maz Ameli authored
      * update copy and tests for confirmation modal
      
      * fix tests
      Unverified
      b6b396de
    • Nicolò Pretto's avatar
    • Cal Herries's avatar
    • Kamil Mielnik's avatar
      Extract click-behavior e2e reproductions (#34898) · 38b472f6
      Kamil Mielnik authored
      * Reuse addOrUpdateDashboardCard
      
      * Extract 15993 repro
      
      * Extract 16334 repro
      
      * Extract 23137 repro
      
      * Extract 18067 repro
      
      * Remove unused alias
      
      * Extract GAUGE_QUESTION_DETAILS & PROGRESS_QUESTION_DETAILS
      
      * Reuse addOrUpdateDashboardCard
      
      * Commit a dumb change to trigger uberjar rebuild
      
      * Revert "Commit a dumb change to trigger uberjar rebuild"
      
      This reverts commit 27ef0600ad0dae1dec98bf1e7282e5872b7293e7.
      Unverified
      38b472f6
    • shaun's avatar
      update Trend chart design (#34587) · 00079fa9
      shaun authored
      Unverified
      00079fa9
    • Anton Kulyk's avatar
    • Cal Herries's avatar
    • Nemanja Glumac's avatar
    • Nemanja Glumac's avatar
      Fix stress-test workflow (#35083) · dbfd6b81
      Nemanja Glumac authored
      [ci skip]
      Unverified
      dbfd6b81
    • Braden Shepherdson's avatar
      Add drop_entity_ids CLI command, to drop all entity_ids (#34996) · 8962b63e
      Braden Shepherdson authored
      This is useful for migrating from serdes v1 to v2.
      
      Fixes #34871.
      Unverified
      8962b63e
    • Nemanja Glumac's avatar
      Fix E2E flake 17514 (#35082) · 25c4e6a7
      Nemanja Glumac authored
      Unverified
      25c4e6a7
  3. Oct 25, 2023
Loading