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
  3. Aug 27, 2024
  4. Aug 26, 2024
    • appleby's avatar
    • Chris Truter's avatar
      Track query analysis failures (#47216) · f984a3e0
      Chris Truter authored
      Unverified
      f984a3e0
    • John Swanson's avatar
      Don't encrypt boolean settings (by default) (#47179) · da2a0a1b
      John Swanson authored
      * Don't encrypt boolean settings (by default)
      
      We have tooling to disable encryption on settings even when the
      `MB_ENCRYPTION_SECRET_KEY` is set. Turn it on by default for all boolean
      settings, which don't need to be encrypted.
      
      I also optimized the code that decrypts settings on startup because I
      didn't want to delay startup if someone had set a bunch of boolean
      settings. With 20 set, the old version added about 200+ ms to startup,
      about 10ms per boolean setting, whether or not it was encrypted or in
      the DB already. The optimized version selects all the never-encrypt
      values from the database at once (a bit silly, but we also just exclude
      raw `true` and `false` values so we don't bother checking them) and
      updates them if they're encrypted - this adds ~40ms to startup with 20
      encrypted boolean settings (about 2ms per boolean setting) and ~5ms to
      startup on subsequent runs, when no encrypted values are in the DB.
      Unverified
      da2a0a1b
    • Braden Shepherdson's avatar
      [MBQL lib] Disable expression type checking entirely (#47245) · 13983247
      Braden Shepherdson authored
      This testing is too strict to support some legitimate use cases that
      have no workaround at present. We can bring back this type-checking
      eventually, once it's possible to correctly express things like
      automatic coercion of strings to numbers in `SUM` aggregations.
      
      Fixes #44431.
      Unverified
      13983247
    • John Swanson's avatar
      Much better collection permission performance (#46942) · af6d6e7f
      John Swanson authored
      There are a few separate changes here:
      
      - Migrations: add and populate indexed columns perm_value, perm_type, and collection_id to permissions
      
      These fields allows us to efficiently run queries based on collection permissions in the DB without string manipulation. Keeping the table as permissions allows us to do this migration in-place. Note that in some cases collections may have been deleted from the database without deleting the associated permissions row (since there was no foreign key before). We need to be defensive here: if we have a permissions row without a corresponding collection, delete the row before running the rest of the migration.
      
      - Write perm_value, perm_type, and collection_id for new collection permissions
      
      A very simple before-insert method sets these fields before a collection permission is written to the DB.
      
      - Replace collection/permissions-set->visible-collection-ids and collection/visible-collection-ids->honeysql-filter-clause with collection/honeysql-filter-clause
      
      Previously, just about everywhere we used permissions-set->visible-collection-ids, what we were essentially doing was an in-app join: select all the collection IDs you have permission on, then convert it to a SQL clause like WHERE collection_id IN ( all of those collection IDs).
      
      Replace both of these with honeysql-filter-clause, which uses the new fields we added to permissions above to construct a honeysql filter representing "all the collections I have permissions on", without needing to round-trip them to the application and back to the DB.
      
      Of course, we can then write a function visible-collection-ids, which uses honeysql-filter-clause, for those cases where we do actually need the whole bunch in the application (we use this, for example, when constructing the effective-location for a collection).
      
      I also added one more toggle to the VisibilityConfig that's passed into the honeysql-filter-clause (and used to be passed to permissions-set->visible-collection-ids), allowing you to select only the effective children of some collection.
      Unverified
      af6d6e7f
    • metamben's avatar
      Support dashboard filters targeting multiple stages in QP (#46935) · 8b1f8840
      metamben authored
      
      * [MBQL lib] Map dashboard filters to last stage w/aggregations
      
      Originally we used the last stage's columns for dashboard filters, but
      then if you eg. use a custom expression to clean up the results of the
      aggregation, then you can't filter at the most useful spot - before the
      aggregations.
      
      Fixes #19744. Related to #26244, #33958.
      
      * Add stage-number option to the dimension not to the field
      
      * Remove FE changes
      
      * Support negative stage numbers
      
      * Add tests for multi-stage parameter expansion
      
      * Specify schema for dimension options
      
      * Fix legacy MBQL schema
      
      * Append stage when running cards with top level summary
      
      * Fix schema
      
      * Only ensure filter stage when the parameters say it's used
      
      * Implement ensure-filter-stage
      
      * Format clj
      
      * Add ensure-filter-stage test
      
      ---------
      
      Co-authored-by: default avatarBraden Shepherdson <braden@metabase.com>
      Unverified
      8b1f8840
    • Noah Moss's avatar
    • lbrdnk's avatar
      Fix `DateTimeRange` substitution for open ranges (#47175) · b75577b5
      lbrdnk authored
      
      * Fix DateTimeRange substitution for open ranges
      
      * Add E2E repro for #47172
      
      * cljfmt
      
      * Add test for datetime column
      
      * Update range boundary for open range
      
      * Update test names
      
      * Apply suggestions from code review
      
      Co-authored-by: default avatarKamil Mielnik <kamil@kamilmielnik.com>
      
      * Fix e2e
      
      ---------
      
      Co-authored-by: default avatarNemanja <31325167+nemanjaglumac@users.noreply.github.com>
      Co-authored-by: default avatarKamil Mielnik <kamil@kamilmielnik.com>
      Unverified
      b75577b5
  5. Aug 23, 2024
  6. Aug 22, 2024
  7. Aug 21, 2024
  8. Aug 20, 2024
Loading