Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Sep 24, 2024
  2. Sep 20, 2024
  3. Sep 18, 2024
  4. Sep 17, 2024
  5. Sep 13, 2024
    • metamben's avatar
      Fix ordering by the accumulated column (#47875) · 1174d9cc
      metamben authored
      1174d9cc
    • metamben's avatar
      Ensure :effective-type for columns from an aggregation in a card (#47936) · d8786ffc
      metamben authored
      * Ensure :effective-type for columns from an aggregation in a card
      
      Fixes #47184
      
      * Synchronize effective-type with the base-type on override
      
      When :base-type in the column metadata is overridden with the :base-type in the field ref, set it as :effective-type
      too.  If :effective-type is also set in the field ref, it wins.
      d8786ffc
    • appleby's avatar
      Revert to non-truncating mbql.u/unique-name-generator in annotate-native-cols (#47866) · 16e31051
      appleby authored
      
      * Rollback to legacy unique-name-generator in annotate-native-cols
      
      * Add native query long column alias test to nested queries tests
      
      * Add native query long column alias test to dataset api tests
      
      * Add native query long column alias test to models e2e tests
      
      * Move limit into inner native query
      
      * PR suggestion: simplify lambda argslist
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * PR suggestion: remove unnecessary mt/with-temp-copy-of-db
      
      * Tweak test name
      
      ---------
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      16e31051
    • dpsutton's avatar
      Controlled upgrades (#47877) · 1addcc19
      dpsutton authored
      
      * Initial commit of controlled upgrades
      
      - new setting upgrade-threshold (`MB_UPGRADE_THRESHOLD`)
        number 0-100
      - conditionally removing latest from upgrade checks
      
      AS OF RIGHT NOW IT ALWAYS REMOVES the latest.
      Should help FE make this optional
      
      * dumb mistake
      
      * handle no latest version info
      
      * implement and basic test
      
      * More tests, refactor name
      
      * more tests
      
      * cljfmt does not like commas in source code.
      
      * Just move site-uuid to the declaration and don't declare it
      
      nothing is sacred in the settings order. no reason. i think i was just
      trying to minimize the diff, which a dumb and ignoble goal.
      
      * add context strings
      
      * update unit tests
      
      * use display version
      
      * Have upgrade threshold include current major version
      
      hopefully helps rotate people from early to late, and late to early
      across major versions. Idea from sanya and quite nice!
      
      ---------
      
      Co-authored-by: default avatarRyan Laurie <iethree@gmail.com>
      1addcc19
  6. Sep 12, 2024
  7. Sep 11, 2024
    • Alexander Solovyov's avatar
    • John Swanson's avatar
      Fix some minor collections issues (#47472) · 0c4a3f8a
      John Swanson authored
      * Fix some minor collections issues
      
      - explicitly provide access to the trash to all users, in the same way
      we provide access to personal collections. Due to migration order, we
      don't necessarily have a permissions row with the correct `perm_type`,
      `perm_value`, and `collection_id` for the Trash collection. That's ok -
      we don't actually move things to the Trash, so there isn't any
      item where `collection_id=$trash.id` - but this may affect things like
      effective ancestors for children of the trash. Let's be explicit about
      the permissions that users have.
      
      - replace a case where we manually calculated effective location and
      then got the parent_id with just hydrating `:effective_parent`. This is
      more efficient.
      
      - replace the simple hydration method for `effective-location-path` with
      a batched hydration method that fetches `visible-collection-ids` *once*
      and then uses it to figure out the effective location path for each
      collection passed.
      0c4a3f8a
    • Cam Saul's avatar
      3beb7fbe
  8. Sep 10, 2024
  9. Sep 09, 2024
  10. Sep 06, 2024
  11. Sep 05, 2024
    • Alexander Polyankin's avatar
    • John Swanson's avatar
      Add a quick test for perms on timeline API (#47636) · 87a08b9d
      John Swanson authored
      We had a security issue where it was possible to query timelines without
      having the requisite permissions on the collection. This test checks to
      make sure this doesn't happen again.
      87a08b9d
    • adam-james's avatar
      Catch Errors in Download process and only write error message (#47482) · 8a02e75f
      adam-james authored
      * walk the error to remove any visualization settings
      
      Thanks Dan for the patch, this approach is nice because it doesn't require changing all 3 streaming-response-writer
      implementations (json csv and xlsx). It keeps behaviour basically the same, but just cleans up the output to not
      include potentially sensitive column/dataset details.
      
      * add a test that confirms json/csv errors are cleaned
      
      * walk the error to remove any visualization settings
      
      Thanks Dan for the patch, this approach is nice because it doesn't require changing all 3 streaming-response-writer
      implementations (json csv and xlsx). It keeps behaviour basically the same, but just cleans up the output to not
      include potentially sensitive column/dataset details.
      
      * add a test that confirms json/csv errors are cleaned
      
      * fix dataset error test
      
      * cljfmt
      
      * try to be a little more surgical with what we take out of the error
      
      * formatting again, oops
      
      * pass export format, only modify the obj for file exports
      
      In the case of errors being saved to files, the obj is a map with a :status :failed key assoc'd by the qp somewhere
      along the way. The format-exception cond branch is not used in this case, so we can't rely on modifying
      `format-exception` to just dissoc ex-data.
      
      Instead, I've kept the obj modification, but it excludes the query and the preprocessed keys, which are the only 2
      keys where we see :viz-settings. This doesn't eliminate the problem of needing to exclude other keys in the future,
      but it does improve the surface area - the query and viz settings are the most likely candidates for holding
      potentially sensitive info.
      
      I'd prefer to stick with this solution, as we can get a fix for the security concern in quicker, and perhaps a
      non-security bug can be opened regarding the most correct way to indicate errors to users whose downloads have failed.
      
      * keep format-exception the same
      
      * cleaner passing of export-format to write-error!
      8a02e75f
    • metamben's avatar
      Support field remapping in pivot queries (#47592) · 05e02e51
      metamben authored
      * Support field remapping in pivot queries
      
      * Generate breakouts without inversions
      05e02e51
    • Chris Truter's avatar
    • Ngoc Khuat's avatar
    • Dennis Schridde's avatar
      Revert "Hide upload config when data warehouse is attached" (#47611) · 7ff0ab3d
      Dennis Schridde authored
      The way this was implemented, it also hid the section for management
      of uploaded CSV files.  Further, admins might want to intentionally
      switch from uploading to the data warehouse provided by Metabase to
      one of their own.
      
      This reverts commit fbaf58ad.
      
      References: https://github.com/metabase/harbormaster/issues/5121
      References: https://metaboat.slack.com/archives/C032LFJFANL/p1725296255637989
      7ff0ab3d
    • Cam Saul's avatar
      API endpoint dox generation should resolve schemas from the registry (#47634) · 7c25508a
      Cam Saul authored
      * API endpoint dox generation should resolve schemas from the registry #46799
      
      * Update Kondo config
      
      * Fix formatting
      7c25508a
  12. Sep 04, 2024
    • appleby's avatar
      Store ::nil markers in CachedMetadataProvider for failed lookups (#47589) · 03aff864
      appleby authored
      * Fix typo in MetadataProvider docstring
      
      * Fix typo in caching-test: s/Second/Third/
      
      * Store ::nil markers in CachedMetadataProvider for failed lookups
      
      Store ::nil markers in CachedMetadataProvider for any ids for which the wrapped/uncached upstream provider fails to return
      metadatas. This prevents repeatedly querying the uncached-provider for ids that don't exist.
      
      The downside is that if the uncached-provider suddenly starts returning metadata for an id that previously did not
      exist, we won't pick up on it, but the assumption here is that this is no different / worse than cache invalidation
      for existing ids that happen to change after we cache them.
      
      * PR suggestion: remove unnecessary test assertion
      03aff864
    • bryan's avatar
      Entity id translation analytics (#47432) · 6305e59e
      bryan authored
      * tracking entity id translation
      
      * add total and more tests
      
      * indentation
      
      * realign the last test
      6305e59e
    • Case Nelson's avatar
      fix: sqlserver handle uniqueidentifier uuids (#47544) · b46a6592
      Case Nelson authored
      * fix: sqlserver handle uniqueidentifier uuids
      
      Fixes #46148
      
      Include sqlserver in `uuid-type` handling as its `uniqueidentifier` type
      stores uuids.
      
      * Don't be so precise with varchar size
      
      * Add seam for drivers to cast to text type
      
      * Fix arg order
      b46a6592
  13. Sep 03, 2024
Loading