Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Aug 30, 2024
    • Chris Truter's avatar
    • Oleksandr Yakushev's avatar
    • 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
  2. Aug 29, 2024
    • Aleksandr Lesnenko's avatar
    • bryan's avatar
      Realign migration ids (#47367) · 05c2fb22
      bryan authored
      * move migration in release to match master
      
      * add column if not exists
      Unverified
      05c2fb22
    • 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
    • github-automation-metabase's avatar
    • Nick Fitzpatrick's avatar
      Query validator FE (#47098) · b7349ec5
      Nick Fitzpatrick authored
      * Query Validator FE
      
      * collection path, unit tests
      
      * wrapping feature with token flag
      
      * updating util function, adding row type
      
      * updating session_test.clj
      
      * type adjustment
      
      * fixing other table sorting
      
      * Empty state, clean up utils
      
      * unit test adjustment
      
      * e2e adjustment
      Unverified
      b7349ec5
    • Ryan Laurie's avatar
      Milestone Check Perms Fix (for real this time) :sweat_smile: (#47401) · 2b25fcab
      Ryan Laurie authored
      * another attempt at perms fix
      
      * try again
      
      * try manual graphql auth
      
      * try with global env
      
      * Try setting defaults in graphql
      
      * try some more things
      
      * use my own graphql instance
      
      * one more test
      
      * remove test code
      
      * remove rogue curly brace
      Unverified
      2b25fcab
    • 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
    • Cam Saul's avatar
      Update Kondo to `2024.08.01` and add `deps.edn` aliases to run from the JVM (#47370) · 7fb88340
      Cam Saul authored
      * Add `clojure -M:kondo` and `clojure -M:kondo:kondo/all` and bump version
      
      * Fix Kondo errors
      
      * Fix Kondo+LSP issues with `defendpoint`, `defenterprise`, etc.
      
      * Use replace-deps instead of deps for speed
      
      * Ok apparently maybe we do need to copy configs when we run Kondo on CI
      
      * Oops `./bin/kondo.sh` should not try to use `clj-kondo`
      
      * Remove references to GA driver folders
      Unverified
      7fb88340
    • Noah Moss's avatar
    • Luiz Arakaki's avatar
      Update instance_analytics for 50 major release (#47323) · bbe366ea
      Luiz Arakaki authored
      This updates the instance analytics YAMLs:
      - v50.22
      - fixes several fk-target-field-id references
      Unverified
      bbe366ea
    • 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
    • Ryan Laurie's avatar
      Flake Jail Update (#47407) · 268268b0
      Ryan Laurie authored
      Unverified
      268268b0
    • Emmad Usmani's avatar
      allow re-ordering and re-naming pie chart slices (#46607) · 0139fd78
      Emmad Usmani authored
      * allow re-ordering and re-naming pie chart slices
      
      * aggregate rows with same dimension value
      
      * show warning when dimension has unaggregated values
      
      * change colors from sidebar
      
      * implement renaming
      
      * styles for slice name widget
      
      * handle numeric slice keys for binned values relative dates etc
      
      * implement slice disabling
      
      * remove old colors setting
      
      * implement merging new and removing existing rows from query results
      
      * fix formatting bugs
      
      * port settings to static viz
      
      * fix bug with unaggregated data
      
      * address todos
      
      * add loki test
      
      * fix measure column settings widget erroring
      
      * fix settings sidebar crashing
      
      * add e2e tests
      
      * update snapshots
      
      * fix pie_chart.cy.spec.js CI-only flakes
      
      * fix #21504 repro failure
      
      * fix click action value
      
      * use nestedSettings instead of seriesSettings
      
      * fix settings sidebar crashing
      
      * fix row with 0 key not being draggable
      
      * fix flaky test
      
      * filter other slices from sidebar
      Unverified
      0139fd78
    • Ryan Laurie's avatar
      Combine filter header buttons (#46984) · badd7d08
      Ryan Laurie authored
      * combine filter header buttons
      
      * refined styling
      
      * unit tests
      
      * another import conflict
      
      * omg another one
      
      * remove double border for filter button
      
      * use vars and update imports
      Unverified
      badd7d08
    • Thomas Schmidt's avatar
    • Thomas Schmidt's avatar
    • dpsutton's avatar
      Increase log level to INFO from error (#47397) · 3f8317ad
      dpsutton authored
      * Increase log level to INFO from error
      
      Closes #47396
      
      logs before:
      ```
      2024-08-29 08:37:03,836 INFO db.liquibase :: Checking if Database has unrun migrations...
      2024-08-29 08:37:04,045 INFO db.liquibase :: Database has unrun migrations. Checking if migration lock is taken...
      2024-08-29 08:37:04,047 INFO db.liquibase :: No migration lock found.
      2024-08-29 08:37:04,047 INFO db.liquibase :: Migration lock acquired.
      2024-08-29 08:37:04,167 INFO db.liquibase :: Running 83 migrations ...
      ```
      
      logs after:
      
      ```
      2024-08-29 08:39:45,019 INFO db.liquibase :: Running 83 migrations ...
      ...
      2024-08-29 08:39:45,166 INFO liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-06-27T00:00:00::calherries ran successfully in 0ms
      2024-08-29 08:39:45,182 INFO liquibase.changelog :: Columns is_defective_duplicate(boolean) added to metabase_field
      2024-08-29 08:39:45,182 INFO liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-06-27T00:00:01::calherries ran successfully in 14ms
      2024-08-29 08:39:45,199 INFO liquibase.changelog :: Custom SQL executed
      2024-08-29 08:39:45,200 INFO liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-06-27T00:00:02::calherries ran successfully in 16ms
      2024-08-29 08:39:45,202 INFO liquibase.changelog :: Foreign key fk_field_parent_ref_field_id dropped
      2024-08-29 08:39:45,202 INFO liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-06-27T00:00:03::calherries ran successfully in 1ms
      2024-08-29 08:39:45,204 INFO liquibase.changelog :: Foreign key constraint added to metabase_field (parent_id)
      2024-08-29 08:39:45,205 INFO liquibase.changelog :: ChangeSet migrations/001_update_migrations.yaml::v49.2024-06-27T00:00:04::calherries ran successfully in 2ms
      ...
      ```
      
      * empty commit to bump CI
      Unverified
      3f8317ad
    • 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
    • Ryan Laurie's avatar
      Add Malay Language Support (#47138) · 9fdc1f9f
      Ryan Laurie authored
      Unverified
      9fdc1f9f
    • Ryan Laurie's avatar
      Update milestone check workflow (#47377) · a8599337
      Ryan Laurie authored
      Unverified
      a8599337
    • Nicolò Pretto's avatar
      locale query string support on public links and static embeds (#47186) · 76b0a3f5
      Nicolò Pretto authored
      
      * keep locale in url query params
      
      * e2e tests
      
      * ugly fix for the missing baseUrl error
      
      * applies suggestion from Kelvin to make code more demure
      
      * Update e2e/test/scenarios/sharing/public-question.cy.spec.js
      
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      
      * remove it.skip added by mistake
      
      * sort imports
      
      * handle native question/ SyncedParametersList too
      
      * shorter and more accurate comment :sweat_smile:
      
      
      
      * Update e2e/support/helpers/e2e-embedding-helpers.js
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      
      ---------
      
      Co-authored-by: default avatarAnton Kulyk <kuliks.anton@gmail.com>
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      Unverified
      76b0a3f5
    • Alexander Solovyov's avatar
    • Alexander Solovyov's avatar
    • 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
  3. 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
      Unverified
      b6602d56
    • Chris Truter's avatar
      Unverified
      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>
      Unverified
      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?
      Unverified
      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>
      Unverified
      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>
      Unverified
      c574c09d
    • Ryan Laurie's avatar
      Quieter Patch Releases (#47356) · 68f3d1b7
      Ryan Laurie authored
      Unverified
      68f3d1b7
    • Anton Kulyk's avatar
    • Oisin Coveney's avatar
Loading