Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Jul 24, 2024
    • Ryan Laurie's avatar
      Fix Analytics DB Appearing in Permissions and SQL Editor (#45957) · 1935be0e
      Ryan Laurie authored
      * don't show audit db in permissions
      
      # Conflicts:
      #	enterprise/frontend/src/metabase-enterprise/audit_app/index.js
      #	frontend/src/metabase-types/api/database.ts
      #	frontend/src/metabase/admin/permissions/selectors/data-permissions/data-sidebar.ts
      #	frontend/src/metabase/plugins/index.ts
      
      * special v49 treatment
      
      * fix test for v49
      
      * add e2e tests for 45831
      
      # Conflicts:
      #	e2e/test/scenarios/collections/instance-analytics.cy.spec.js
      1935be0e
  2. Jul 15, 2024
  3. Jul 11, 2024
    • John Swanson's avatar
      Make import work on a fresh install (#45297) (#45390) · e777280f
      John Swanson authored
      This introduces a new metadata on commands, `:requires-init`. If set,
      we'll run `metabase.core/init!` before running the command. `init!` will
      initialize the database and run our normal startup, though it won't
      actually start the Metabase server.
      
      This allows you to use
      
      ```
      env MB_CONFIG_FILE_PATH=... java -jar metabase.jar import /my/metabase/export
      ```
      
      We'll run the normal init process (creating the internal user, loading
      from the config file, etc), then run the command.
      
      On my machine this adds about 2-3 seconds to the time it takes to run an
      `import`.
      e777280f
  4. Jul 10, 2024
  5. Jul 09, 2024
  6. Jul 04, 2024
  7. Jun 28, 2024
    • John Swanson's avatar
      backported "Error on import into an empty appdb (#44840)" (#44850) · e8f2cccb
      John Swanson authored
      I was thinking about the potential options here.
      
      On one hand, we could initialize the app db ourselves. This is a little
      problematic, because:
      
      - our `init!` function is in `metabase.core` and calling it yields a
      painful cyclical dependency. It's also pretty tied to outputting things
      to the user that they might not expect during an import, e.g. "Looks
      like this is a new installation ... preparing setup wizard", and starts
      up jobs, etc.
      
      - if we choose to *only* initialize the database ourselves (only the
      bits that we actually *need* initialized), I'm a little nervous about
      maybe missing something. Right now we need to create the internal user
      and create users from the config file before running the import. If we
      added a third thing, would we remember to update this?
      
      - we could refactor to put all of the above in one spot, but this is a
      P1 and it feels important to close this out as quickly as possible. We
      also don't claim to support initializing the app DB from an import in
      the first place.
      
      So: just throw an exception if the app db hasn't been set up yet. Our
      heuristic here is whether a single non-internal user has been created.
      So if you want to use your config, you can run:
      
      ```
      MB_CONFIG_FILE_PATH=dev/config.yml java -jar metabase.jar
      java -jar metabase.jar import /my/exported/dump
      ```
      
      If you try to run `java -jar metabase.jar import ...` on a fresh
      DB, it'll now fail with the error message:
      
      ```
      You cannot `import` into an empty database. Please set up Metabase
      normally, then retry.
      ```
  8. Jun 25, 2024
  9. Jun 21, 2024
  10. Jun 20, 2024
    • Ryan Laurie's avatar
      :cherries: backport: Automatically add milestones to prs and issues (#44357) (#44419) · 9597008b
      Ryan Laurie authored
      * ci: Automatically add milestones to prs and issues (#44357)
      
      * automatically add milestones to prs and issues
      
      * test code
      
      * test code
      
      * test commit (#3138)
      
      * test commit (#43320)
      
      * test commit (#44357)
      
      * remove test code
      
      * add newlines
      
      * prefer older version milestones
      # Conflicts:
      #	.github/workflows/check-milestone.yml
      #	release/src/index.ts
      #	release/src/linked-issues.ts
      #	release/src/linked-issues.unit.spec.ts
      
      * type fix
      
      * backport another function
      9597008b
  11. Jun 15, 2024
  12. Jun 14, 2024
  13. Jun 13, 2024
  14. Jun 11, 2024
  15. Jun 07, 2024
    • metabase-bot[bot]'s avatar
      Move database role to url parameters from connection properties on Snowflake (#43602) (#43835) · 55821acb
      metabase-bot[bot] authored
      
      * Move role to url parameters from connection properties
      
      * Fix test
      
      Co-authored-by: default avatarlbrdnk <lbrdnk@users.noreply.github.com>
    • metabase-bot[bot]'s avatar
    • John Swanson's avatar
      Fix remaining `tinyint` booleans in MySQL (#43296) (Backport #43296) (#43781) · 5eb26508
      John Swanson authored
      
      * Correct type for `report_card.dataset`
      
      This was missed in the original migration of boolean types to
      ${boolean.type} in MySQL/MariaDB, and then missed again by me when I
      migrated `collection_preview` over a week ago.
      
      * Change all boolean types to `bit(1)` in MySQL
      
      Liquibase changed their boolean type in MySQL from `bit(1)` to
      `tinyint(4)` in version 4.25.1. Our JDBC driver does not recognize these
      as booleans, so we needed to migrate them to `bit(1)`s.
      
      As discussed [here](#36964), we
      changed all existing `boolean` types that were in the
      `001_update_migrations.yml` but not the SQL initialization file.
      
      For new installations, this works: things in the SQL initialization file
      get created with the `bit(1)` type.
      
      However, for existing installations, there's a potential issue. Say I'm
      on v42 and am upgrading to v49. In v43, a new `boolean` was added.
      
      In this case, I'll get the `boolean` from the liquibase migration rather
      than from the SQL initialization file, and it need to be changed to a
      `bit(1)`.
      
      I installed Metabase v41 with MySQL, migrated the database, and then
      installed Metabase v49 and migrated again. I made a list of all the
      columns that had the type `tinyint`:
      
      ```
      mysql> SELECT TABLE_SCHEMA, TABLE_NAME, COLUMN_NAME, COLUMN_TYPE,        COLUMN_DEFAULT, IS_NULLABLE FROM INFORMATION_SCHEMA.COLUMNS WHERE COLUMN_TYPE = 'tinyint' AND TABLE_SCHEMA='metabase_test';
      +---------------+------------------------------+-------------------+-------------+----------------+-------------+
      | TABLE_SCHEMA  | TABLE_NAME                   | COLUMN_NAME       | COLUMN_TYPE | COLUMN_DEFAULT | IS_NULLABLE |
      +---------------+------------------------------+-------------------+-------------+----------------+-------------+
      | metabase_test | core_user                    | is_datasetnewb    | tinyint     | 1              | NO          |
      | metabase_test | metabase_field               | database_required | tinyint     | 0              | NO          |
      | metabase_test | metabase_fieldvalues         | has_more_values   | tinyint     | 0              | YES         |
      | metabase_test | permissions_group_membership | is_group_manager  | tinyint     | 0              | NO          |
      | metabase_test | persisted_info               | active            | tinyint     | 0              | NO          |
      | metabase_test | report_card                  | dataset           | tinyint     | 0              | NO          |
      | metabase_test | timeline                     | archived          | tinyint     | 0              | NO          |
      | metabase_test | timeline                     | default           | tinyint     | 0              | NO          |
      | metabase_test | timeline_event               | archived          | tinyint     | 0              | NO          |
      | metabase_test | timeline_event               | time_matters      | tinyint     | NULL           | NO          |
      +---------------+------------------------------+-------------------+-------------+----------------+-------------+
      10 rows in set (0.01 sec)
      ```
      
      Then wrote migrations. For each column, we:
      
      - turn it into a `bit(1)`,
      
      - re-set the previously existing default value, and
      
      - re-add the NOT NULL constraint, if applicable.
      
      * Change author and add missing `dbms`
      
      ---------
      
      Co-authored-by: default avatarSakuragiYoshimasa <ysrhsp@outlook.com>
      5eb26508
  16. Jun 06, 2024
  17. Jun 05, 2024
  18. Jun 04, 2024
  19. May 31, 2024
  20. May 30, 2024
    • lbrdnk's avatar
      [Manual backport] Backfill :effective-type for coerced fields (#43144) (#43358) · e9396b21
      lbrdnk authored
      * [Manual backport] Backfill :effective-type for coerced fields (#43144)
      
      * Remove bulk-metadata "pre-warm" call
      
      bulk-metadata implementation for metadata provider in use
      is not present on this branch. Hence the pre-warm call was
      removed. Passing of no-lazyness-test hints that should be ok.
      
      * Update test
      
      query reqires keywordized form on 49
      
      * Fix missing every-pred
      e9396b21
  21. May 28, 2024
    • Jesse Devaney's avatar
      Implement graceful error handling for trend charts (#43090) (#43245) · de28e832
      Jesse Devaney authored
      * fix trend charts erroring on latest value being null
      
      * refactor previousRowIndex calculation
      
      * handle errors gracefully
      
      * refactor error messages
      
      * update computeTrend unit tests
      
      * add error handling integration test
      
      * add E2E test to check that errors are gracefully handled
      
      * add integration test to enforce the fix
      
      * fix static viz
      
      * display more meaningful error on static-viz trend charts
      
      * move error handling out of trend chart and fix error handling in Visualization.tsx
      
      * update compute.unit.spec.js
      
      * update SmartScalar.unit.spec.js
      
      * use separate error handler for ErrorBoundary errors in Visualization.jsx
      
      * update E2E test
      
      * update error handling
      
      * update compute.unit.spec.js
      
      * fix react state change error in render function
      
      * show generic error message for ErrorBoundary caught errors
      
      * revert ErrorBoundary changes
      
      * remove generic error border for visualizations
    • bryan's avatar
      bump saml20 - fix azure SLO (#43238) · a2d12bce
      bryan authored
      a2d12bce
    • Alexander Solovyov's avatar
  22. May 27, 2024
  23. May 23, 2024
Loading