Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Sep 09, 2024
  2. Sep 06, 2024
  3. Sep 05, 2024
  4. 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
      Unverified
      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
      Unverified
      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
      Unverified
      b46a6592
  5. Sep 03, 2024
  6. Sep 02, 2024
  7. Aug 31, 2024
    • adam-james's avatar
      Bugfix part2 snowflake variants in attachments 46981 (#47488) · 6e1f3851
      adam-james authored
      * Snowflake Variant cols should also work in attachments
      
      A previous PR fixed the snowflake variant bug by using a try/catch aroung the global-type-settings function.
      I realized there was a second codepath using the same function and it gets used in xlsx attachment code, so I've made
      the change there as well to prevent the same error in attachments.
      
      * add a test to confirm the viz-settings-for-col function doesn't throw
      Unverified
      6e1f3851
  8. Aug 30, 2024
    • adam-james's avatar
      Snowflake Variant Type should not prevent downloads or attachments (#47434) · 0677d95b
      adam-james authored
      * Snowflake Variant Type should not prevent downloads or attachments
      
      Fixes #46981
      
      The :type/SnowflakeVariant key matches 2 methods in `metabase.query-processor.streaming.common/global-type-settings`.
      
      In this case, it seems that the variant type can be any type, so we shouldn't try to guess anything here, except if
      the user has provided a :semantic_type, which we can use.
      
      Otherwise, we'll keep going without formatting details about the variant column, which is likely fine already, as it
      should result in strings in the export/attachments.
      
      * add a test
      Unverified
      0677d95b
    • metamben's avatar
      Check joins in lib.metadata/editable? (#47421) · 0ef7e4bc
      metamben authored
      Unverified
      0ef7e4bc
    • Ngoc Khuat's avatar
      [notification] webhook for alert (#45201) · d897f201
      Ngoc Khuat authored
      
      * [notification] New method: `channel/can-connect?` (#44955)
      
      * [notification] Channel APIs (#45207)
      
      * [notification] namespaced channel type (#45527)
      
      * [Notification] Render alert for http channel (#45545)
      
      * [notification] Add channel description (#45840)
      
      * [notification] update API to enable http channels for alert (#45839)
      
      * [Notification] Remove channel details for users without write perms (#46034)
      
      * [Notification] Serdes channel (#46031)
      
      * [Notification] Update http details schema (#45960)
      
      * [Notification] Deactivate channels will delete PulseChannel (#46115)
      
      * [Notification] audit log for channel create and update (#46113)
      
      * [Notification] Disallow undefined key for http channel details (#46712)
      
      * [Notification] Handle channel name conflicts (#46818)
      
      * Webhooks Admin Section (#46194)
      
      * [notification] Fix test pulse endpoint does not work properly for http channels (#46474) (#47050)
      
      * [Notification] Fix unable to update multiple channels per type (#47111)
      
      * [Notification] Record Task History when pulse sends channel message (#46218)
      
      * Enabling Webhook Alerts (#47022)
      
      * [Notification] fix cyclic deps (#47379)
      
      * [notification] channel serdes spec (#47386)
      
      Co-authored-by: default avatarNick Fitzpatrick <nick@metabase.com>
      Unverified
      d897f201
  9. Aug 29, 2024
    • bryan's avatar
      Static embed dashboard and question endpoints (#47270) · b0dbb38e
      bryan authored
      
      * entity id translation + tests
      
      * add api level test
      
      * simplify definition of eid-table->model + add test
      
      * update tests to take keywords
      
      * improve comment
      
      * generate the eid-table->model map
      
      * delete now-obsolete test
      
      * make it work in oss
      
      * put the resulting response into a key, so we can add more information later
      
      * formatting
      
      * use model names without the model/ prefix as keys
      
      * Creates list of `api/model->db-model`
      
      - update keys for util/entity_id request
      - update shape of util/entity_id response
      - add test for not-found eids
      
      * formatting
      
      * Respond to code review feedback
      
      * entity-ids work on /embed/{card,dashboard}* routes
      
      * make entity id translation work for all tokens
      
      * Merge branch 'static-embed-dashboard-and-question-endpoints' of github.com:metabase/metabase into static-embed-dashboard-and-question-endpoints
      
      * massage schema. add tons of tests
      
      * decode more eids
      
      * test alignment
      
      * don't require ns inside of itself :think:
      
      * make the test functions to create tokens better
      
      * bring back `dashboard-url`
      
      ---------
      
      Co-authored-by: default avatarOisin Coveney <oisin@metabase.com>
      Unverified
      b0dbb38e
    • Dennis Schridde's avatar
      Hide attached DWH database details (#47247) · 592360c9
      Dennis Schridde authored
      == Goal ==
      
      Hide attached DWH database details from anyone incl. admins:
      * Do not show them in the UI
      * Do not permit to change them
      * Do not serialize them
      
      The aim is that customers cannot gain access to (parts of) credentials,
      and they cannot break a feature they are paying for by changing
      connection details.
      
      == Implementation ==
      
      The Metabase backend already contains provisions in the implementation
      of `metabase.models.interface/to-json` for `:model/Database` to hide the
      `details` of the database in HTTP responses, if the user lacks write
      permission on the database.  We utilize this by adding an
      `is_attached_dwh` column to the `database` table and rejecting
      `metabase.models.interface/can-write?` when this flag is enabled.  In
      the "admin" UI, we show a replacement text instead of the edit form when
      the flag is set.  (It might be correct to show this whenever `details`
      is absent.  See below for possible follow-up work.)
      
      However, several sections of the frontend code expected the `details`
      field to always be present.  In order to make `details` optional, as the
      backend seems to handle it, we fix the respective code to treat this
      case in the way that appears appropriate in the context.
      
      Database details are already generally excluded from H2 dump snapshots
      (see `metabase.cmd.copy/*copy-h2-database-details*`), thus nothing
      changes there.
      
      == How to test ==
      
      === New behaviour ===
      
      Setting the `is_attached_dwh` field hides the database details:
      
      1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases.
         - In addition to the fields you would normally set, also set
           `is_attached_dwh: true`.
         - This also works when adding this flag to a database that previously
           did not have this flag set.
      2. Start your Metabase instance.
      3. Verify the database shows up in the "admin" section
         (`/admin/databases`).
      4. Verify that clicking the database to see its details only reveals
         "This database cannot be modified."
      5. Verify that responses from the backend do not include a `details`
         field for this database.
      
      === Original behaviour ===
      
      Behaviour without setting the `is_attached_dwh` field is unchanged:
      
      1. Configure a database as described in https://www.metabase.com/docs/latest/configuring-metabase/config-file#databases.
         - Only set the fields you would normally set.  Do not set
           `is_attached_dwh` (or set it to `false`).
      2. Start your Metabase instance.
      3. Verify the database shows up in the "admin" section
         (`/admin/databases`).
      4. Verify that clicking the database to see its details only reveal the
         regular edit form, showing connection fields like `host`, `user`,
         etc. with the values you configured.
      
      == How this will be rolled out ==
      
      1. Upgrade existing Metabase Cloud instances with data warehouse to a
         Metabase version that supports `is_attached_dwh`.
      2. Set `is_attached_dwh` in the database section of the config file for
         Metabase Cloud instances with a data warehouse.
      
      == Possible follow-up work ==
      
      In https://github.com/metabase/metabase/issues/25715, absent
      `database.details` was identified as a bug.  Since then, `details` was
      made `NOT NULL` in the application database, so this bug can no longer
      occur.  However, today backend responses can be missing the `details`
      field, if the current user lacks write permission to the database
      setting (see above).  Fully re-evaluating the fix to #25715 in this
      context is outside the scope of this PR.
      
      Closes: https://github.com/metabase/harbormaster/issues/5051
      Unverified
      592360c9
    • John Swanson's avatar
      Fixup backported migrations (#47398) · b0d9bc53
      John Swanson authored
      These migrations will be backported to v49.
      
      Three changes:
      
      - update IDs/locations of the migrations to v49 vs v51
      
      - add one preCondition (when adding the foreign key constraint)
      
      - add `onFail: MARK_RAN` to the index preconditions. I forgot this
      before, so it blows up when the precondition doesn't hold.
      Unverified
      b0d9bc53
    • Ngoc Khuat's avatar
      Fix failed to backfill cache config due to number overflow (#47390) · 9adbbb9a
      Ngoc Khuat authored
      
      * handle cache config overflowed
      
      * fix root too
      
      * do not comment out test
      
      * make cljfmt happy
      
      ---------
      
      Co-authored-by: default avatarAlexander Solovyov <alexander@solovyov.net>
      Unverified
      9adbbb9a
    • Noah Moss's avatar
      Exclude inactive tables from the perms cache, and block queries over inactive... · 37162aa2
      Noah Moss authored
      Exclude inactive tables from the perms cache, and block queries over inactive tables in the QP (#47363)
      
      Unverified
      37162aa2
    • metamben's avatar
      Make metric metadata keep the metric's name (#47313) · f2ef2de9
      metamben authored
      * Make metric metadata keep the metric's name
      
      This is a fix for the problem reported in #40355, which is fixed separately for v50 and backported to v49.
      
      * Patch broken test
      
      * Normalize dataset-query
      
      * Normalize legacy queries only
      Unverified
      f2ef2de9
    • Ngoc Khuat's avatar
      Fix formatting on master (#47382) · 5d4d797d
      Ngoc Khuat authored
      Unverified
      5d4d797d
    • Ngoc Khuat's avatar
      Record field usage (again) (#46704) · 1ccdce4c
      Ngoc Khuat authored
      Unverified
      1ccdce4c
  10. Aug 28, 2024
Loading