Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

Run Mage Tests on all PRs and fix module count (#70656)

bryan1da8e5751a7a
diff --git a/.github/workflows/mage.yml b/.github/workflows/mage.yml
index 7847a965155..3024fcdb836 100644
--- a/.github/workflows/mage.yml
+++ b/.github/workflows/mage.yml
@@ -2,9 +2,6 @@ name: Mage Tests
on:
pull_request:
- paths:
- - "mage/**"
- - "bb.edn"
jobs:
# run mage tests even if the rest of be isnt needed
diff --git a/mage/src/mage/modules.clj b/mage/src/mage/modules.clj
index 2354b37f8a5..f0d349efcf7 100644
--- a/mage/src/mage/modules.clj
+++ b/mage/src/mage/modules.clj
@@ -115,6 +115,7 @@
login-history
notification
permissions
+ premium-features
public-sharing
pulse
remote-sync
diff --git a/mage/test/mage/modules_test.clj b/mage/test/mage/modules_test.clj
index 06c5ced1e11..eedb8500f1e 100644
--- a/mage/test/mage/modules_test.clj
+++ b/mage/test/mage/modules_test.clj
@@ -269,10 +269,20 @@
If this test fails, you've likely connected a module to driver that shouldn't trigger driver tests.
Add it to driver-affecting-overrides if it shouldn't trigger driver tests."
(let [modules-triggering-drivers (modules-affecting-drivers)
- ;; This count was 37 as of 2026-02-06. Update this number ONLY if you
- ;; intentionally want more modules to trigger driver tests.
- ;; 2-10-26 Bumping to 38 for sql-tools + sql-parsing
- max-allowed-count 38]
+ ;; This is a ratchet: it prevents accidental expansion of which modules
+ ;; trigger driver tests. When a module transitively depends on driver code,
+ ;; changes to that module cause ALL driver tests to run in CI, which is
+ ;; expensive. If this test fails, either:
+ ;; 1. Your module legitimately affects drivers -- bump max-allowed-count
+ ;; 2. Your module is infrastructure/gating, not driver logic
+ ;; -- add it to driver-affecting-overrides in mage.modules
+ ;;
+ ;; History:
+ ;; 2026-02-06 Initial count: 37
+ ;; 2026-02-10 Bumped to 38 for sql-tools + sql-parsing
+ ;; 2026-03-10 Bumped to 40 for lib-metric + metrics (Metrics Explorer #68961)
+ ;; Added premium-features to driver-affecting-overrides (#69561)
+ max-allowed-count 40]
(is (<= (count modules-triggering-drivers) max-allowed-count)
(format "Too many modules trigger driver tests! Expected <= %d, got %d.
Modules triggering driver tests: %s