Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Apr 15, 2024
  2. Apr 12, 2024
  3. Apr 11, 2024
  4. Apr 10, 2024
    • dpsutton's avatar
      Fix #39138 again (#40936) · b1e83541
      dpsutton authored
      * Fix #39138 again
      
      Fixes #40934
      
      Got unfixed somehow in #40578. seems like some file renames caught it off guard
      
      But the long and short is that its possible for a persisted model to end
      up in the state "refreshing" (possible an instance restart during
      refreshing). The refreshing job doesn't look for these so they become
      effectively invisible.
      
      Since the job to refresh them will only run one at a time cluster wide,
      any jobs that are in the "refreshing" state when the refresher begins to
      refresh are necessarilly stuck (no one else could currently be
      refreshing them). So we can just add them to the queue of models to
      refresh.
      
      ```clojure
      (jobs/defjob ^{org.quartz.DisallowConcurrentExecution true ;; <----
                     :doc "Refresh persisted tables job"}
        PersistenceRefresh [job-context]
        (refresh-job-fn! job-context))
      ```
      
      * Ensure ee/oss pathways are taken in tests
      
      Annoying little footgun here. CI does not run with an ee token, so in
      order to ensure that test pathway goes through ee version of a
      defenterprise we _must_ use the `mt/with-premium-features
      {:cache-granular-controls}`,  but we also want to ensure that it goes
      through the oss version.
      
      So two options, a `doseq` on both features (empty set and the feature
      that triggers this). But want a test in the enterprise folder as well to
      ensure.
      
      The real trickiness comes from running tests at a repl and CLI. My REPL
      always has an ee token in it. My command line always lacks that as
      well. So want to be explicit about the token features in effect at test
      time.
      
      That's why I'm essentially duplicating tests (ee in ee folder, oss in
      regular pathway)
      Unverified
      b1e83541
    • Cal Herries's avatar
    • Cal Herries's avatar
      Mitigate some redshift flakes (#41191) · 4c00bc49
      Cal Herries authored
      Unverified
      4c00bc49
  5. Apr 08, 2024
    • Cam Saul's avatar
      More Metric => LegacyMetric renaming (#40418) · a8719405
      Cam Saul authored
      * Wow
      
      * Test fix :wrench:
      
      * Fixes
      
      * Actions should use strings for column names (fix :update-row and :create-row normalization)
      
      * MLv2 schema should check against keys for the other query type
      
      * Ok, have I fixed things?
      
      * More fixes :wrench:
      
      * Fix indentation
      
      * Another round of test fixes. :wrench:
      
      * Hopefully the last few test fixes :wrench:
      
      * We need to test normalization for queries that have keyword keys as well.
      
      * Fix Cljs i18n namespaces
      
      * Sort namespaces
      
      * Only test against H2
      
      * Rename `metabase.mbql` to `metabase.legacy-mbql`
      
      * Fix Kondo warnings
      
      * Test fixes :wrench:
      
      * Register MBQL clause schemas and test fixes :wrench:
      
      * Test fixes and PR feedback
      
      * Test fix
      
      * Remove the normalization tests
      
      * Test fixes :wrench:
      
      * Fix kondo
      
      * Fix import
      
      * Another fix :wrench:
      
      * Merge
      
      * FIXES
      
      * Add another missing REQUIRE
      
      * More Metric => LegacyMetric renaming
      
      * metabase.models.metric-important-field => metabase.models.legacy-metric-important-field
      
      * Even more renaming
      
      * More renaming
      
      * Even more fixes.
      
      * More renaming
      
      * Wow, even more renaming!!
      Unverified
      a8719405
    • Alexander Solovyov's avatar
    • Cal Herries's avatar
    • Alexander Solovyov's avatar
      cache invalidation (#40774) · 84642517
      Alexander Solovyov authored
      New endpoint accepts entity and entity ids in form of `database=1&dashboard=2&question=3`. If you don't supply
      `&include=overrides`, then it tries to find configs directly referencing supplied entities and updates their
      `invalidated_at`. If you supply `&include=overrides`, all the referenced cards are
      updated (`report_card.cache_invalidated_at`).
      
      Cache strategies then select the maximum `invalidated_at` in their logic. EE-only.
      
      resolves #40548
      Unverified
      84642517
    • Oisin Coveney's avatar
  6. Apr 06, 2024
  7. Apr 05, 2024
  8. Apr 04, 2024
  9. Apr 03, 2024
    • Raphael Krut-Landau's avatar
      Basic cache admin UI (#39234) · c1f4bff8
      Raphael Krut-Landau authored
      Adds:
      * Performance tab 
      * Data caching settings tab
      * Two-panel strategy editor
      * "Don't cache" strategy
      * "TTL" strategy
      * "Duration" strategy
      * "Use default" option for databases
      * OSS page
      * Unit tests
      
      [Loom](https://www.loom.com/share/b1b173a52be9401588ffb63f718e052a?sid=bed4bdf5-f967-4d93-af55-9b96b6b52730)
      Unverified
      c1f4bff8
    • Uladzimir Havenchyk's avatar
      Do not put js code into page title (#40901) · d12c549a
      Uladzimir Havenchyk authored
      
      * Do not put js code into page title
      
      * Typecheck
      
      * Add e2e test
      
      * Update e2e/test/scenarios/question/document-title.cy.spec.js
      
      Co-authored-by: default avatarKamil Mielnik <kamil@kamilmielnik.com>
      
      ---------
      
      Co-authored-by: default avatarKamil Mielnik <kamil@kamilmielnik.com>
      Unverified
      d12c549a
    • Mahatthana (Kelvin) Nomsawadi's avatar
      [MS2] 1. Analytics (#40681) · af54379a
      Mahatthana (Kelvin) Nomsawadi authored
      * Remove old config + fix typo
      
      * Add new analytics for 4 new illustration settings
      Unverified
      af54379a
    • Cal Herries's avatar
      Unverified
      e5f9d2c4
    • Mahatthana (Kelvin) Nomsawadi's avatar
      [M1] Metabase illustration settings (#40219) · 715174d3
      Mahatthana (Kelvin) Nomsawadi authored
      
      * Add login page illustration (#39299)
      
      * Move Metabot setting to a new place
      
      * Add setting for login page illustration
      
      * fix UI styling
      
      * Fix not able to upload the same file twice
      
      * Update the admin > appearance > conceal metabase copy
      
      * Prepare the component for tests
      
      * Add some unit tests
      
      * Prevent settings not saved sometimes
      
      After setting the value to/from `custom` one of the setting could be
      failed to save, I suspect this happens because the race condition from
      trying to save the setting values relatively at the same time.
      
      * Make unit tests easier to read
      
      * Add all unit test test cases
      
      * Add basic E2E test
      
      * Show fallback icon for broken images
      
      * Make use of the proper component
      
      * Update the comment to affect the reality
      
      * Add an error message when file size is over 2MB
      
      * Show an error message when the file size > 2MB
      
      * Add the error message tests
      
      * Preserve the preview image aspect-ratio
      
      * Detect corrupted images
      
      * Fix failing unit tests
      
      * Address feedback: Type
      
      * Feedback: Create meaningful variables
      
      * Feedback: Make selector API more sensible
      
      * Prevent race condition
      
      Makes sure we save the settings completely before making other actions
      that also change settings otherwise, there could be race conditions.
      
      * Feedback: tighten up a type
      
      * Feedback: Fix inconsistency callback calls
      
      * 2. Add the rest 3 illustration settings (#40487)
      
      * Add the rest 3 illustration settings
      
      * Don't make the X icon feel lonely
      
      * Fix illustration widget saving
      
      * Fix type error
      
      * 3. Update the select UX to match new design (#40491)
      
      * Update the select UX to match new design
      
      * Move info dot next to file upload button
      
      * Simplify IllustrationWidget API
      
      * Update setting title copy
      
      * Clean up test comments
      
      * Feedback: Clarify `any` type
      
      * Feedback: Use shorthand object creation
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Feedback: Use global CSS glass instead of inlining values
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * Feedback: Remove unnecessary curly brackets in JSX
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      ---------
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      
      * 4. Connect illustrations to new setting values (#40139)
      
      * Wire landing page illustration to the setting value
      
      * Wire the unsubscribe page to the setting value
      
      * Prepare no rows error to be wired to the setting value
      
      * Wire no question results illustration to the setting value
      
      * Wire no search results illustration to setting value
      
      * Fix error from fixing conflict
      
      * Fix required unnecsseary prop on Image
      
      * Use Image component
      
      * Link dashboard card no results image to the setting value
      
      * Move the no data results to more a generic directory
      
      * Link collection picker no results image to the setting value
      
      * Make illustrations more accessible
      
      * Fix failed tests
      
      * Test unscribe page illustration + test no illustration
      
      * Add landing page tests
      
      * Simplify Cypress selectors
      
      * Refactor: Rename settings to match the new requirements
      
      No question data -> No Data
      No search results -> No object
      
      These changes are made so, these 2 settings are generic enough to
      include other illustrations later on.
      
      * Add no data illustration test
      
      * Add no object illustration tests
      
      * Fix unsubscribe page background style
      
      * Fix not able to build static viz
      
      * 5. Follow-up on milestone 1 (#40710)
      
      * Update custom background illustration scale behavior
      
      * Remove the need to put an SVG file in static folder
      
      * Fix test from rebasing off master with @testing-library/user-event upgrade
      
      ---------
      
      Co-authored-by: default avatarDenis Berezin <denis.berezin@metabase.com>
      Unverified
      715174d3
  10. Apr 02, 2024
  11. Mar 28, 2024
  12. Mar 27, 2024
    • Sloan Sparger's avatar
    • John Swanson's avatar
      Allow group managers to view all people (#40619) · c6dd2765
      John Swanson authored
      Fixes #40328
      
      [Our documentation](https://www.metabase.com/docs/latest/people-and-groups/managing#group-managers) states that:
      
      > Group managers can:
      >
      > - View all people in the Admin settings > People tab.
      
      This fixes enforcement to be aligned with the documentation. This behavior makes sense, because as the docs also state, Group Managers should be allowed to *add* people to the group they manage, which they can only do if they can see those people!
      
      Initially, I also removed a faulty test, which was described as:
      ```
      ;; Non-segmented users are allowed to ask for a list of all of the users in the Metabase instance. Pulse email lists
      ;; are an example usage of this. Segmented users should not have that ability. Instead they should only see
      ;; themselves. This test checks that GET /api/user for a segmented user only returns themselves
      ```
      
      but actually failed to test this in a relevant way (because it was testing the `GET /api/user` endpoint rather than the `GET /api/user/recipients` endpoint). The test had continued to pass only because the user was the only member of the group they managed.
      
      I initially thought this behavior wasn't desired, but as it turns out, it *is* in fact documented behavior to disallow sandboxed users from seeing any email suggestions. Investigating, I found that a bug was allowing sandboxed users to see all users on the `/api/user/recipients` endpoint if the user-visibility setting was set to `:all`.
      
      Thus, the second commit fixes the bug and re-adds the (fixed) test. A sandboxed user now only sees their own user when hitting `/api/user/recipients`.
      Unverified
      c6dd2765
    • Oisin Coveney's avatar
  13. Mar 26, 2024
  14. Mar 25, 2024
Loading