Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Feb 01, 2024
    • adam-james's avatar
      Fixed width dashboard migration (#38247) · ffd18732
      adam-james authored
      
      * Migration adding 'width' to Dashboards
      
      3 migrations:
       - 1st adding the width column with default value of 'fixed'
       - 2nd updating all existing dashboards to have width 'full', which corresponds to what the current behaviour is (will
       be the 'old' behaviour after the fixed-width project lands).
         - The rolloback here is necessary but we don't care what happens as the column will be dropped immediately in the
         next rollback anyway
       - 3rd sets the notNullableConstraint. DefaultNull is 'full' here, just in case there's an existing dashboard whose
       width value is not yet set from the 1st migration. Don't know how that could happen, but its here in case
      
      * Dashboard PUT api endpoint accepts width changes and updates appdb
      
      update-dashboard function now is aware of the :width key so those changes can end up in the transaction.
      
      Also added a width test that asserts that the value's default is "fixed", it can be changed, eg. to "full", but cannot
      be changed to other values.
      
      * Add width to revision tests
      
      * Fix dashboard revision tests.
      
      :width key is now needed in some revision tests. As well we need a string communicating that the :width setting has
      changed from 'full' to 'fixed' or vice-versa.
      
      * Fix comments/remarks in migration to be accurate
      
      * Attempt to fix default not working mysql/mariadb
      
      * Set default in dashboard model
      
      Signed-off-by: default avatarAdam James <adam.vermeer2@gmail.com>
      
      * Revert default :width 'fixed' value.
      
      * Explicitly add default value 'fixed' for MySQL/MariaDB
      
      ---------
      
      Signed-off-by: default avatarAdam James <adam.vermeer2@gmail.com>
      Unverified
      ffd18732
    • Cal Herries's avatar
    • Ngoc Khuat's avatar
  2. Jan 31, 2024
    • John Swanson's avatar
      Query row limit doesn't limit in-product downloads (#37716) · aa76efb2
      John Swanson authored
      I misunderstood the desired behavior when I implemented this before. We
      only want the limit to apply when the `add-default-userland-constraints`
      middleware is applied to the query, not when we're downloading the data
      directly.
      
      This is a bit of a rat's nest. If there's a better way to approach the
      problem, I'd be happy to hear it. I added documentation for the odd approach
      as much as possible.
      
      The main difficulty is that the userland middleware does not have access
      to db-local settings. So if we want db-local settings to apply only to
      userland, we have to hack our way around it.
      
      The solution here is to divide the userland middleware into two parts:
      
      - the actually-userland bit, which just marks the query as needing
      default limits, and
      
      - a middleware inserted deeper in the middleware stack (just before we
      actually apply limits) that actually calculates those limits and
      attaches them to the query.
      Unverified
      aa76efb2
    • Cal Herries's avatar
    • Cal Herries's avatar
      CSV appends: Do not allow numbers with fractional component to be uploaded to... · 6fa785b5
      Cal Herries authored
      CSV appends: Do not allow numbers with fractional component to be uploaded to an integer column (#38274)
      
      Unverified
      6fa785b5
  3. Jan 30, 2024
    • John Swanson's avatar
      Add intermittent test solver (#38159) · ebbc6670
      John Swanson authored
      Sometimes a test passes when run by itself, but fails due to ordering
      issues. This is typically caused by another test failing to properly
      clean up after itself, leaving the database in a dirty state. For
      example, we might change permissions and forget to change them back, so
      that another test hits an unexpected permissions failure.
      
      Finding the cause of these has been a source of pain for me, so I wrote
      a small snippet to do it for me.
      
      If you have a test that passes when run by itself, but fails when run
      along with all the other tests, you can run
      `(dev/find-root-test-failure! #'my-ns/my-intermittent-failure-test')`.
      
      It will run *all* tests. After each one, it'll run the test you passed
      in. Once that test starts failing, it'll alert you about which test
      caused it to fail.
      Unverified
      ebbc6670
    • metamben's avatar
      Support converting aggregation references to legacy references (#37705) · 1692da23
      metamben authored
      
      * Support converting aggregation references to legacy references
      * Pass query and stageIndex to legacyQuery
      
      ---------
      
      Co-authored-by: default avatarAlexander Polyankin <alexander.polyankin@metabase.com>
      Unverified
      1692da23
  4. Jan 29, 2024
  5. Jan 26, 2024
  6. Jan 25, 2024
  7. Jan 24, 2024
  8. Jan 23, 2024
    • Tim Macdonald's avatar
      Fix one flaky [SparkSQL?] fingerprinting test (#37853) · 40468091
      Tim Macdonald authored
      * Fix flake in fingerprint test:
      
      ```
      FAIL in metabase.sync.analyze.fingerprint-test/fingerprint-test (fingerprint_test.clj:287)
      
      :sparksql
       Fingerprints should actually get saved with the correct values Text fingerprints
      expected: {:global {:distinct-count 100, :nil% 0.0},
                 :type {:type/Text {:average-length #<Fn@2ee5402f metabase.sync.analyze.fingerprint_test/fn__139755[fn/fn]>,
                                    :percent-email 0.0,
                                    :percent-json 0.0,
                                    :percent-state 0.0,
                                    :percent-url 0.0}}}
        actual: nil
      ```
      
      * Typo fix
      Unverified
      40468091
  9. Jan 22, 2024
  10. Jan 19, 2024
  11. Jan 18, 2024
  12. Jan 17, 2024
Loading