Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jan 11, 2024
  2. Jan 10, 2024
    • metabase-bot[bot]'s avatar
      :robot: backported "Apply selective malli mu.fn enforcement for certain namespaces... · ffa9d90a
      metabase-bot[bot] authored
      :robot:
      
       backported "Apply selective malli mu.fn enforcement for certain namespaces to improve performance" (#37544)
      
      Co-authored-by: default avatarbryan <bryan.maass@gmail.com>
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
    • metabase-bot[bot]'s avatar
    • Mark Bastian's avatar
      Fixing case of invalid graph.dimension (#37279) (#37526) · 81f30ef8
      Mark Bastian authored
      When trying to render a card with viz settings containing a nonexistent dimension, an error would result in `mult-x-axis-rowfn` causing a failure to render.
      
      This fix simply replaces `map` with `keep` in `metabase.util.ui-logic/mult-x-axis-rowfn` and `metabase.util.ui-logic/mult-y-axis-rowfn` so that `nil` values are dropped if a bad dimension or metric name is provided.
      
      The following easily shows the broken case (now fixed). Previously, an error was rendered. Now you get the chart.
      
      ```clojure
      ;; REPRO
      (comment
        (ns tickets.37266-slack-error
          (:require
           [clojure.test :refer :all]
           [dev.render-png :as render-png]
           [metabase.models :refer [Card]]
           [metabase.pulse.render.body :as body]
           [metabase.query-processor :as qp]
           [metabase.test :as mt]
           [toucan2.core :as t2]))
      
        (let [busted? true]
          (mt/dataset test-data
            ;; Note that this uses orders since we have that as test data.
            (mt/with-temp [Card {base-card-id :id}
                           {:dataset_query          {:database (mt/id)
                                                     :type     :query
                                                     :query    {:source-table (mt/id :orders)
                                                                :aggregation  [[:count]]
                                                                :filter       [:between [:field (mt/id :orders :created_at) nil] "2019-05-16" "2019-08-16"]
                                                                :breakout     [:field (mt/id :orders :created_at) {:temporal-unit :week}]}}
                            :display                :line
                            :visualization_settings {:table.pivot_column      "state"
                                                     ;; This is also intentionally broken
                                                     :graph.metrics           (if busted?
                                                                                ["frooby"]
                                                                                ["count"])
                                                     :graph.show_trendline    false
                                                     :graph.x_axis.title_text "Week"
                                                     :graph.y_axis.title_text "PR Review Activity"
                                                     ;; Using a missing dimension name breaks the results
                                                     :graph.dimensions        (if busted?
                                                                                ["_sdc_extracted_at"]
                                                                                ["created_at"])
                                                     :graph.show_values       false
                                                     :table.cell_column       "count"}}]
              (render-png/render-card-to-png base-card-id)))))
      ```
      
      (cherry picked from commit 27587264)
    • Mark Bastian's avatar
      Updating honeysql alias in dev ns (#36758) (#37522) · d0a0e636
      Mark Bastian authored
      * Updating honeysql alias in dev ns
      
      This just fixes a broken require to align with the work in #36670.
      
      Fixes #36757
      
      (cherry picked from commit b4408e03)
  3. Jan 09, 2024
  4. Jan 08, 2024
  5. Jan 05, 2024
  6. Jan 04, 2024
Loading