Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jan 12, 2024
  2. Jan 11, 2024
  3. Jan 10, 2024
    • Mark Bastian's avatar
      Don't send results works at the card level (#37546) · 6f0161ac
      Mark Bastian authored
      * Don't send results works at the card level
      
      When a user enables **Don't send if there aren't results** this was the previous behavior:
      - If no results appeared on any card, no emails was sent. This was expected.
      - If any card contained results, all cards were sent in the email, including those that had no results.
      
      This PR modifieds that behavior to only send those cards that contain results for a dashboard pulse. For example, if 5 cards are present on a dashboard and 3 have no results, only results for the 2 cards containing data are included in the pulse.
      
      Primary changes:
      - `metabase.pulse/execute-dashboard` now removes any card with a row count of 0 in its computed result if `skip_if_empty` is true for the pulse.
      - The addition of tests covering the matrix of tests where `skip_if_empty` is true or false, all cards contain data, some cards contain data, and no cards contain data.
      - The `with-skip-if-empty-pulse-result` makes the above set of tests nice and concise.
      
      Minor changes:
      - Fixing a minor issue in `with-metadata-data-cards` in which the macroexpansion logic would go bad if the user used a different symbol name for `base-card-id`.
      - Spelling and formatting issues in `metabase.pulse`
      
      Fixes #34777
      
      * lint fix for #_{:clj-kondo/ignore [:unresolved-symbol]}
      Unverified
      6f0161ac
    • bryan's avatar
      Apply selective malli mu.fn enforcement for certain namespaces to improve performance (#37428) · 0f9cf7c9
      bryan authored
      * rough approach for per-namespace schema checking
      
      * Added tests
      
      * cleanup + add a namespace to skip
      
      * use stringified namespaces instead of ns objects
      
      * move to `instrument-ns?`+ trying to not emit an if
      
      * WIP, working on tests
      
      * eval
      
      * Fixup tests and remove some errant junk
      
      tests are a bit tricky because the the reader expands the macro so we
      can't do anything at runtime to affect the binding. This is why we use
      eval so we can coordinate when the binding happens
      
      * some notes and remove the pulse ns from ad-hoc exclusions
      
      * add docstrings and comments
      
      * remove redundant case statement
      
      * swapped branches in mu/defn, so that when `skip?` we emit deparameterized fn
      
      * skip logging message about calculating display name in prod
      
      - it was suspected as part of the high cpu usage issue here:
        https://github.com/metabase/metabase/issues/37144
      
      
      
      * config/is-prod? is not avaliable in cljs
      
      * use the right kind of quote
      
      * actually it's ok to use binding if we delay the evaluation of the macro
      
      * use :cljs-dev and :cljs-release to skip printing sus message in prod
      
      * use cljs-dev and cljs-release to control printing message
      
      * add more tests for defn, and move fn_skip_test into fn_test
      
      * add info in mu/defn docstring about instrument-ns? skipping behavior
      
      * fix test
      
      ---------
      
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      Unverified
      0f9cf7c9
    • Sloan Sparger's avatar
      Fix external landing page urls locking users out of Metabase (#37322) · 4a9b1162
      Sloan Sparger authored
      * updates enterprise appearance settings ui to validate that landing page urls are relative
      
      * adds e2e test, impls feedback to use isMetabaseUrl util
      
      * makes new e2e tests more resilient
      
      * fixes logical mistake in e2e test
      
      * removes old e2e test that accounted for invalid landing page urls being saved
      
      * impls pr feedback
      
      * extracts out url validation logic and adds unit tests
      Unverified
      4a9b1162
    • Alexander Polyankin's avatar
      Remove getQuery selector (#37450) · 1f9e03f6
      Alexander Polyankin authored
      Unverified
      1f9e03f6
    • adam-james's avatar
    • bryan's avatar
    • Alexander Polyankin's avatar
    • Alexander Polyankin's avatar
Loading