Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 29, 2024
  2. Aug 28, 2024
    • metamben's avatar
      Support multiple bucketings of a column in nested queries (#47362) · b6602d56
      metamben authored
      * Support multiple bucketings of a column in nested queries
      
      Fixes #46644
      
      * Fix e2e test
      b6602d56
    • Chris Truter's avatar
      f49407fc
    • Nick Fitzpatrick's avatar
      Adding schema name to recents, search results in CP (#47255) · 0352066f
      Nick Fitzpatrick authored
      
      * Adding schema name to recents, search results in CP
      
      * adding unit test
      
      * fixup tests + clarify recent item schema
      
      ---------
      
      Co-authored-by: default avatarBryan Maass <bryan.maass@gmail.com>
      0352066f
    • Nick Fitzpatrick's avatar
      Support ctrl + click on command palette links again (#47328) · 5626216a
      Nick Fitzpatrick authored
      * remove prevent default on CP links
      
      * unit flakes?
      5626216a
    • Noah Moss's avatar
    • Phoomparin Mano's avatar
      feat(sdk): generate sample Express.js api and user switcher components via cli (#47060) · 41b7f329
      Phoomparin Mano authored
      
      * ask for tenancy isolation columns
      
      * deny all permissions for all users group
      
      * create new collections
      
      * add jwt group mappings
      
      * add the permissions step
      
      * add multi-tenancy message in helper text format
      
      * add permission graph
      
      * wire together permissions
      
      * use schema permissions
      
      * use fields from table metadata from query_metadata
      
      * add tenancy field reference
      
      * remove log messages
      
      * deny access to unsandboxed tables
      
      * make permission graph more explicit
      
      * deny access to sample database for customer groups
      
      * add unit test for permission graph
      
      * split permission groups and sandboxes
      
      * jwt settings and hard-coded user attributes
      
      * handle errors when updating sso mappings
      
      * add express api and user switcher
      
      * only fallback to api keys when license is invalid
      
      * add util to sample tenancy column values
      
      * conditional BASE_SSO_API imports
      
      * improve embedding error message
      
      * setup jwt configuration after license step
      
      * setup permissions at the last step
      
      * add missing import
      
      * update steps that requires license
      
      * fix incorrect imports
      
      * add missing useContext
      
      * handle permission update error
      
      * remove tenancyIsolationEnabled field
      
      * add tenancy column sampling
      
      * differentiate tenancy column query error
      
      * rename tenancyColumnValues to tenantIds
      
      * assign sampled tenant ids to user attributes
      
      * add tenant ids
      
      * define collection permissions
      
      * reference sandboxing group by name
      
      * update snippet to be same as the README
      
      * extract ask for tenancy columns to a separate step
      
      * use the customer_id attribute
      
      * query the table query metadata at origin
      
      * append tables correctly
      
      * improve error handling in table scanning
      
      * add retry logic to metadata fetching
      
      * only query metadata for selected fields
      
      * fix race condition with retry
      
      * update loading state and retries
      
      * update comments on jwt license
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      
      * filter the target table by id
      
      * highlight last selected tenant column
      
      * use breakout to get list of ids
      
      * temporary workaround to reload the whole page
      
      * update row value types
      
      * update row value types
      
      * block non-selected tables
      
      * remove the source-field from sandboxing
      
      * use the fk_target_field_id as instead of target.id
      
      * update unit test
      
      * remove source-field as we only reference our own column
      
      * make native permission types more strict
      
      ---------
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      Co-authored-by: default avatarOisin Coveney <oisin@metabase.com>
      41b7f329
    • Phoomparin Mano's avatar
      feat(sdk): setup permissions and sandboxing for embedding cli (#46857) · c574c09d
      Phoomparin Mano authored
      
      * ask for tenancy isolation columns
      
      * deny all permissions for all users group
      
      * create new collections
      
      * add jwt group mappings
      
      * add the permissions step
      
      * add multi-tenancy message in helper text format
      
      * add permission graph
      
      * wire together permissions
      
      * use schema permissions
      
      * use fields from table metadata from query_metadata
      
      * add tenancy field reference
      
      * remove log messages
      
      * deny access to unsandboxed tables
      
      * make permission graph more explicit
      
      * deny access to sample database for customer groups
      
      * add unit test for permission graph
      
      * split permission groups and sandboxes
      
      * jwt settings and hard-coded user attributes
      
      * handle errors when updating sso mappings
      
      * add util to sample tenancy column values
      
      * improve embedding error message
      
      * setup jwt configuration after license step
      
      * setup permissions at the last step
      
      * handle permission update error
      
      * add tenancy column sampling
      
      * differentiate tenancy column query error
      
      * rename tenancyColumnValues to tenantIds
      
      * define collection permissions
      
      * reference sandboxing group by name
      
      * extract ask for tenancy columns to a separate step
      
      * query the table query metadata at origin
      
      * append tables correctly
      
      * improve error handling in table scanning
      
      * add retry logic to metadata fetching
      
      * only query metadata for selected fields
      
      * fix race condition with retry
      
      * update loading state and retries
      
      * filter the target table by id
      
      * highlight last selected tenant column
      
      * use breakout to get list of ids
      
      * update row value types
      
      * block non-selected tables
      
      * remove the source-field from sandboxing
      
      * use the fk_target_field_id as instead of target.id
      
      * update unit test
      
      * remove source-field as we only reference our own column
      
      * make native permission types more strict
      
      ---------
      
      Co-authored-by: default avatarOisin Coveney <oisin@metabase.com>
      c574c09d
    • Ryan Laurie's avatar
      Quieter Patch Releases (#47356) · 68f3d1b7
      Ryan Laurie authored
      68f3d1b7
    • Anton Kulyk's avatar
    • Oisin Coveney's avatar
      5ec18217
    • lbrdnk's avatar
      Revert "Add :legacy/merge-indents? to .cljfmt.edn (#47345)" (#47357) · bd2d8479
      lbrdnk authored
      This reverts commit 3759c8d4.
      bd2d8479
    • Raphael Krut-Landau's avatar
      fix(admin/performance): Ensure that the strategy form is not considered dirty... · ca295739
      Raphael Krut-Landau authored
      fix(admin/performance): Ensure that the strategy form is not considered dirty if the user changes an empty field to that field's default value, or vice versa (#46543)
      
      ca295739
    • lbrdnk's avatar
      3759c8d4
    • Braden Shepherdson's avatar
      [QP] Return datetimes in SQL Server, even with date-sized truncation (#47248) · cb222495
      Braden Shepherdson authored
      Previously, truncating a `:type/DateTime` column by `:month` or `:day`
      would return a `:type/Date`, which subtly broke the query.
      
      In particular, if you try to order-by the breakout column `Created At (month)`
      then it would not get de-duplicated, causing a SQL error about conflicting
      ORDER BY clauses.
      
      Fixes #46992.
      cb222495
    • Uladzimir Havenchyk's avatar
  3. Aug 27, 2024
    • Alexander Polyankin's avatar
    • Aleksandr Lesnenko's avatar
    • Jeff Bruemmer's avatar
      docs - clarify caching doc (#47330) · 533711e0
      Jeff Bruemmer authored
      * clarify caching doc
      
      * edit
      533711e0
    • John Swanson's avatar
      Speed up calculation of effective_ancestors (#47324) · 8a7cc885
      John Swanson authored
      Previously, `visible-collection-ids` was effectively "free" in that we'd
      cached `collection-id->collection` for *all* collections, within a
      single request, and then locally filtered it for permissions without
      needing to hit the database again.
      
      To be honest, there is probably a better fix for this - we're repeatedly
      calling `visible-collection-ids` when we probably could just save a
      single copy of it and use it when calculating the effective location of
      every collection.
      
      However, this is a very quick and low-risk fix, and I want to prioritize
      getting this done, and then we can improve it later.
      
      Locally, I copied down the database from stats and timed the
      `/api/search?model_ancestors=true` endpoint.
      
      Before my "speedup" PR (https://github.com/metabase/metabase/pull/46942)
      it took ~7 seconds to return results.
      
      After my "speedup" PR, it took ~15s to return results. :grimace:
      
      With this change, it takes 818ms to return results. :tada:
      8a7cc885
    • Alexander Polyankin's avatar
      e1440320
    • appleby's avatar
      Ensure that CI checks fail if cljs tests fail (#47192) · 52284e62
      appleby authored
      * Fix typo in expression-clause-normalization-test
      
      s/time-interval/relative-time-interval/
      
      * Add missing table-id to card def to fix failing legacy-ref-test
      
      * Ensure that if yarn test-cljs fails it fails the CI checks
      
      When configured to autorun, the command
      
         shadow-cljs compile test
      
      will exit success even if test failures occur in the node test. See
      
         https://github.com/thheller/shadow-cljs/issues/425
      
      In order to ensure our CI checks fail when cljs tests fail, we need to invoke
      node directly. To prevent running the tests twice, remove `:autorun true` from
      the `:test` target in shadow-cljs.edn.
      52284e62
    • Raphael Krut-Landau's avatar
      fix(questions + admin/performance): Improve Clear cache button text and... · 58806612
      Raphael Krut-Landau authored
      fix(questions + admin/performance): Improve Clear cache button text and question refresh button tooltip (#46791)
      
      58806612
    • Jeff Bruemmer's avatar
      docs - notes on public links (#47315) · 7046722c
      Jeff Bruemmer authored
      7046722c
    • appleby's avatar
      zoom-in-timeseries-drill: do not include :hour and :minute for DATE columns (#46997) · 45808440
      appleby authored
      
      * zoom-in-timeseries-drill: do not include :hour and :minute for DATE columns
      
      When the user attempts to drill through a DATE column, we should not return :hour or :minute drill throughs from
      available-drill-thrus. Previously we did, which resulted in an error being displayed when the user attempted to select
      them.
      
      Modify next-breakout-unit in zoom_in_timeseries.cljc to not return :hour or :minute units for :type/Date columns,
      which prevents these from being returned by available-drill-thrus, which prevents them appearing in UI context menus.
      
      * Use lib.temporal-bucket/available-temporal-buckets
      
      Per review feedback, use lib.temporal-bucket/available-temporal-buckets to get the valid-current-units in
      metabase.lib.drill-thru.zoom-in-timeseries.
      
      * Do not construct zipmap just to lookup the next unit
      
      Rather than constructing a zipmap from `valid-current-units', which requires iterating over the seq twice, just
      traverse the seq once and return the next item in the seq (if any).
      
      Constructing a zipmap made sense in the old code because it was constructed once from static data and used many times
      for lookup. In the new version, the vec of `valid-current-units` is dynamic and dependent on the type of the breakout.
      
      * PR suggestion: use threading macro rather than nested sexps
      
      Co-authored-by: default avatarBraden Shepherdson <braden@metabase.com>
      
      * PR suggestion: use threading macro rather than transducer / eduction
      
      * PR suggestion: reduce boilerplate in zoom-in-timeseries tests
      
      Reduce code dup by looping over aggregation and bucketing options rather than having a separate deftest for each.
      
      ---------
      
      Co-authored-by: default avatarBraden Shepherdson <braden@metabase.com>
      Fixes #39366
      45808440
    • Nicolò Pretto's avatar
      poc of using loki to test png/pdf exports (#45650) · e441f1d5
      Nicolò Pretto authored
      * use loki to test png exports on questions
      
      * try to put the img in the body to see if it fixes the scrollbar issues in ci
      
      * fix linting issues
      
      * let's try again in ci
      
      * Attempt to make CI wait before taking a snapshot for downloaded PNGs
      
      * Use the snapshots from CI for PNG downloads
      
      * pdf export test thanks to kelvin suggestion about just testing the png
      
      * refactored the code to extract a util function
      
      * remove pdf tests as they broke in ci :shrug:
      
      
      
      * Update frontend/src/metabase/env.ts
      
      Co-authored-by: default avatarPhoomparin Mano <poom@metabase.com>
      
      * Update frontend/src/metabase/lib/loki-utils.ts
      
      ---------
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      Co-authored-by: default avatarPhoomparin Mano <poom@metabase.com>
      e441f1d5
Loading