Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Oct 16, 2021
  2. Oct 15, 2021
    • Jeff Evans's avatar
      Fix flaky `rotate-encryption-key!-test` (#18371) · 82b3147c
      Jeff Evans authored
      Fix flaky `rotate-encryption-key!-test`
      
      Bind a temporary site locale when running the test, and disable the settings cache
      
      Now, a full explanation of what was making the test flaky, for posterity:
      
      When this test runs, it first tries to create a blank app DB.  This is either postgres, h2, or mysql, depending on the driver under test, which is slightly confusing, but anyway...
      
      In order to populate all the app DB tables (since the "real" app DB has already been initialized at this point to even run the test), it first rebinds the appropriate dynamic vars for the db type, spec, connection, etc. and then loads a test fixture H2 file into the app DB.  This h2 test fixture file, evidently, contains all the current app DB tables, etc.
      
      When initializing the app DB from H2 (in `metabase.cmd.copy/copy!`), the code needs to internationalize certain loading message strings.  And in order to internationalize messages, it has to look up the current site locale, which is itself an application setting, which of course comes from the setting entity table.
      
      For the "regular" blank app DB scenario (i.e. when Metabase first starts with a blank app DB), there is some code in the `metabase.util.i18n.impl` namespace to handle this chicken and egg problem (basically, defaulting to "en" if it can't be loaded from the app DB because there is no app DB yet).  But after this tricky process finishes, that temporary, hacked lookup is replaced by the real one (since now, the app DB exists and the locale can just be loaded normally).
      
      For the purpose of our test, that is the problem.  That state (which swaps out the `site-locale-from-setting` fn) has already run (remember, we have already initialized the app DB to even run this test in the first place, and now we are swapping in a temporary one).  So the call to load the site locate from the settings table (which is needed to print the loading message to initialize this temp app DB) fails, and hence the test fails.
      
      Now, the reason this test was flaky, instead of just always failing, is because of the settings cache.  If the site locale had been loaded anywhere within some short time frame before this test needs to load it, to print init messages, then it succeeds!  But that doesn't always end up happening, of course, since it's effectively a race condition (setting cache expiration versus test execution timing).
      Unverified
      82b3147c
    • Howon Lee's avatar
      Make EE audit app frontend display error if queries fail · ff6a56bd
      Howon Lee authored
      Currently it only displays JS errors. Now, it still displays JS errors first but if there's a query error and no JS error it'll display the query error
      Unverified
      ff6a56bd
    • Alexander Lesnenko's avatar
      Revert removing ci commands (#18493) · 60bc250f
      Alexander Lesnenko authored
      Unverified
      60bc250f
    • Dalton's avatar
      refactor getMappingsByParameter function in metabase/meta/Dashboard.js (#18340) · 10de89ec
      Dalton authored
      * refactor getMappingsByParameter
      
      * handle dashcard.series and dashcard.parameter_mappings being undefined
      
      * pull out getMapping fn from getMappings
      
      * rmv hasDisjointValueSets code + ui warning
      Unverified
      10de89ec
    • Nemanja Glumac's avatar
      #18458 Repro: Caching does not respect user defined settings (#18479) · 75663e94
      Nemanja Glumac authored
      * Expand `openNativeEditor` helper for use with multiple databases
      Unverified
      75663e94
    • Alexander Lesnenko's avatar
    • Ariya Hidayat's avatar
    • Nemanja Glumac's avatar
    • Nemanja Glumac's avatar
  3. Oct 14, 2021
  4. Oct 13, 2021
  5. Oct 12, 2021
  6. Oct 11, 2021
Loading