Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 14, 2024
  2. Aug 13, 2024
  3. Aug 07, 2024
    • lbrdnk's avatar
      Add `relative-time-interval` mbql function 2 (#46438) · 582fa9ad
      lbrdnk authored
      * Add :relative-time-interval mbql function
      
      * Add relativeDateFilterPartsRelativeTimeInterval
      
      * Update display-name-method :relative-time-interval
      
      * Update desugar-relative-time-interval
      
      * Define relative-time-filter op
      
      * Add or update tests
      
      * Update tests
      
      * Update display-name-method
      
      * Update test
      
      * Fix positive relative-time-interval shift
      
      * Add checkins:1-per-day:60 dataset
      
      * Update var name
      
      * Bail out from optimization of relative-time-interval desugared filters
      
      * Update dataset kondo hook
      
      * Generate cache required for kondo hooks in kondo.sh
      
      * Rename dataset
      Unverified
      582fa9ad
  4. Aug 05, 2024
    • Chris Truter's avatar
      Various hardenings for SQL analysis (#46432) · 39bb33ec
      Chris Truter authored
      ### Description
      
      This change should fix some explosions in stats due to phantom fields, while also making things a bit more rigorous.
      
      - Record the table schema in query_field - especially useful for unknown tables
      - Allow null table names in query_field - they might be phantoms, or they might not
        - We still have the option to filter them out in tools we build on top
      - Tighten up matching logic to consider schema
      Unverified
      39bb33ec
  5. Aug 01, 2024
  6. Jul 31, 2024
    • John Swanson's avatar
      Some improvements to the REST API for query field validation (#46024) · c4196d99
      John Swanson authored
      * Allow filtering on collection
      
      * Add `effective_ancestors` to collection data
      
      Note: I removed the `qv=` comparator. I think it'.s better to be more explicit
      about what exactly we're asserting. In particular, I hadn't updated the
      `:count` when we were filtering on collection type, so the count was
      still the total for *every* collection even though the results were being
      restricted by the collection. However the `qv=-data` function was still
      reporting that everything was OK, because it was accounting for other
      data from the App DB by just asserting that the count we'd specified was
      lower than the actual count. I'd argue it's better for tests to fail
      locally because I have garbage in my app DB (which I can clean up) than
      succeed when they really shouldn't.
      
      * Consolidate effective ancestors
      
      For the Search API, we're currently returning slightly different
      ancestors:
      
      - it never has the Root Collection, and
      
      - the ancestors don't have a `personal_owner_id`
      
      We could change the API (and maybe will soon - it seems pretty
      unexpected to have `effective_ancestors` sometimes act one way and
      sometimes act another) but for now we can just reshape things to look
      the same as they did before, while using the same code under the hood.
      Unverified
      c4196d99
  7. Jul 30, 2024
    • John Swanson's avatar
      Add an API to get stale dashboards and cards (#44711) · cbbcf4c8
      John Swanson authored
      
      * Make an internal API for retrieving stale content
      
      This introduces the `metabase.stale` module, which has one public
      function (so far): `metabase.stale/find-candidates`. This takes a set of
      `collection-ids`, a cutoff date, and pagination/sort info.
      
      Next, we introduce an HTTP API endpoint that will figure out the appropriate
      set of `collection-ids` for a given user/request, call this function,
      and return the results in the shape we want.
      
      Also: for e2e tests, we need a way to mark a card or dashboard as stale. I
      think the easiest way to do this is to just create a testing endpoint
      that we can call to update the `last_used_at` or `last_viewed_at` of the
      card/dashboard to set it to ~7 months ago.
      
      
      ---------
      
      Co-authored-by: default avatarbryan <bryan.maass@gmail.com>
      Unverified
      cbbcf4c8
  8. Jul 29, 2024
    • Braden Shepherdson's avatar
      [perf] Better CLJC memoization; bounded strategy, fast versions (#46199) · 6e64a3e0
      Braden Shepherdson authored
      Expands and refactors `metabase.util.memoize` to support better cross-platform memoization.
      
      **Better basic memoization**
      
      Use `clojure.core.memoize/memo` (and its clone in CLJS) rather than `clojure.core/memoize` for
      the "everything forever" strategy.
      
      **Bounded memoization**
      
      There are a few places (eg. `u/kebab-case-en`) where we want zero-overhead *hits* and expect the input space
      to be fixed. To guard against runaway memory usage, this **bounded** strategy dumps the entire cache when it
      overflows. It logs an INFO level note when that happens - the intent here is that the threshold should never
      actually get hit!
      
      **Fast JVM versions**
      
      In the special case where the function to memoize takes exactly 1 argument which is a valid map key, we can
      use `ConcurrentHashMap.computeIfAbsent` as the basis of the cache and have much less overhead.
      
      `fast-memo` and `fast-bounded` implement this in CLJ; in CLJS they just call `memo` and `bounded`.
      Unverified
      6e64a3e0
  9. Jul 25, 2024
  10. Jul 23, 2024
  11. Jul 18, 2024
  12. Jul 17, 2024
  13. Jul 16, 2024
  14. Jul 15, 2024
  15. Jul 10, 2024
  16. Jun 20, 2024
  17. Jun 19, 2024
  18. Jun 07, 2024
  19. Jun 03, 2024
  20. May 31, 2024
  21. May 30, 2024
  22. May 27, 2024
  23. May 21, 2024
    • Cam Saul's avatar
      `metabase.search` namespace (#42487) · d5a32ecb
      Cam Saul authored
      * Search API namespace
      
      * Search API namespace
      
      * Search API namespace
      
      * Fix Kondo warnings
      
      * Fix typo
      
      * Finally solve the MySQL ^:parallel test failures <3
      
      * Make some search tests REPL-friendly
      
      * Did I finally fix `^:parallel` MySQL tests?
      
      * Ok I give up just make the search tests single-threaded for MySQL/MariaDB.
      
      * Revert the stuff to make paralell tests work for MySQL... for now.
      
      * Keep new name
      
      * Revert deps-graph changes
      
      * Remove unused namespaces
      
      * Fix Kondo linter for log/info + format
      
      * Misc fixes :wrench:
      
      * Test fixes :wrench:
      Unverified
      d5a32ecb
    • Cam Saul's avatar
      `metabase.analyze` API namespace (#42469) · 618b8c28
      Cam Saul authored
      * Squashed commit
      
      * Update config
      
      * Backport the kondo ignore stuff from other PR.
      
      * `metabase.analyze` API namespace
      Unverified
      618b8c28
  24. May 20, 2024
  25. May 13, 2024
  26. May 10, 2024
  27. May 09, 2024
  28. May 08, 2024
    • Cam Saul's avatar
      Cam's module linter 5000 (#42250) · 1e9e60a0
      Cam Saul authored
      * Cam's module linter 5000
      
      * Get Kondo passing
      
      * Revert changes to usage of mdb.setup/setup-db!
      
      * Check ns shapes
      
      * Add ns :require shape linter; PR feedback
      
      * Linter fixes :wrench:
      Unverified
      1e9e60a0
  29. May 07, 2024
  30. May 05, 2024
  31. May 01, 2024
Loading