-
- Downloads
Fix #39138 again (#40936)
* 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)
Showing
- enterprise/backend/src/metabase_enterprise/cache/config.clj 2 additions, 1 deletionenterprise/backend/src/metabase_enterprise/cache/config.clj
- enterprise/backend/test/metabase_enterprise/cache/config_test.clj 30 additions, 0 deletions...se/backend/test/metabase_enterprise/cache/config_test.clj
- src/metabase/models/persisted_info.clj 1 addition, 0 deletionssrc/metabase/models/persisted_info.clj
- test/metabase/task/persist_refresh_test.clj 14 additions, 12 deletionstest/metabase/task/persist_refresh_test.clj
Please register or sign in to comment