58 Commits

Author SHA1 Message Date
Ben Grabow
ff8e7993d3 Internal load-namespaces tool to check for compilation errors (#80009)
* Internal load-namespaces tool to check for compilation errors

* Ignore load-namespaces in module checks

* lint load-namespaces

* Reject positional args

* Test the new utility

* Guard against nonexistent root.
Make the code more testable.
2026-08-19 07:56:18 -05:00
Cam Saul
6f738a55b8 Enable cljfmt :remove-blank-lines-in-forms? (#74784)
* Update configs

* Update driver features

* cljfmt

* Format new changes

* Merge latest master
2026-05-26 14:47:57 -07:00
Cam Saul
cc84d93477 Enable cljfmt fixing comment alignment (#74613)
* Enable cljfmt fixing comment alignment

* Align bb cljfmt version

* Revert cljfmt version bump for now

* Update with latest master
2026-05-22 15:58:22 -07:00
Oleksandr Yakushev
f9ce3f291d [match] Remove old match implementations based on clojure.core.match (#73209)
* [match] Remove old match implementations based on clojure.core.match

* Rename match-lite to match-one and replace-lite to replace

* Stop using clojure.core.match completely

* Move metabase.lib.util.match to metabase.util.match

* Remove clojure.core.match dependency

* Update docstrings

* Address comments
2026-05-11 00:58:50 +03:00
Cam Saul
4ae75fc5e6 Replace leftover usages of 'pMBQL' with 'MBQL 5' (#72066)
* Replace the term 'pMBQL' with 'MBQL 5'

* Restore deleted file
2026-04-07 09:29:27 -07:00
Oleksandr Yakushev
3f898be45a [match] Implement replace-lite and use it instead of replace (#69270) 2026-02-20 23:39:57 +02:00
Oleksandr Yakushev
795fa21b9d Add &parents to match-lite and rewrite remaining match/match-one usages (#69259) 2026-02-18 15:04:04 +02:00
Oleksandr Yakushev
d4702e10e0 Merge remaining match -> match-many rewrites (#69686)
* [match] Implement match-many as a replacement for match

* [match] Add proper docs to match-lite and match-many
2026-02-17 23:56:04 +02:00
Oleksandr Yakushev
7beb2e3eb1 [match] Implement match-many as a replacement for match (#68659)
[match-lite] Add support for &match anaphor and better nil handling
2026-02-14 16:24:48 +02:00
Vamsi Peri
dbe8b1f36d Workspaces for editing Transforms (#66015)
Co-authored-by: Chris Truter <chris@metabase.com>
Co-authored-by: Kamil Mielnik <kamil@kamilmielnik.com>
Co-authored-by: Uladzimir Havenchyk <uladzimir@metabase.com>
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
Co-authored-by: Stas Gavrylov <stasgavrylov@gmail.com>
Co-authored-by: Oleksandr Solovyov <alexander@solovyov.net>
2026-02-03 17:45:55 +00:00
Oleksandr Yakushev
0ec522227b [match-lite] Make match-lite recursive by default (#68658)
Make match-lite recursive by default
2026-01-27 20:27:01 +02:00
Cam Saul
4509828711 Split up queries and queries-rest modules (#66677) 2025-12-11 14:49:27 -08:00
Cam Saul
569b976fc0 Add Kondo linter to make sure all tests are in a known module and fix violations (#66561)
* Add linter

* `metabase.query-processor-test.*` => `metabase.query-processor.*`

* cljfmt and ignore namespaces outside of module system

* `metabase.timeseries-query-processor-test` => `metabase.query-processor.timeseries-test`

* `metabase-enterprise.upload-test` => `metabase-enterprise.sandbox.upload-test`

* move `metabase-enterprise.models.entity-id-test` into `serialization`

* `metabase-enterprise.content-management.api.collection-test` => `content-verification`

* `metabase-enterprise.notification.payload.core-test` => OSS `notification`

* rename other ee notification payload test namespace

* Last round of fixes? 🔧

* Fix tests 🔧
2025-12-08 21:31:57 +00:00
Oleksandr Yakushev
185aa6841a Remove transducers and core.logic deps (#66510) 2025-12-05 01:50:40 +02:00
Cam Saul
94d2daaafd Backend module detangling pre Clojure/conj 2025 edition (#65681)
* Split warehouses and warehouses-rest

* Split warehouse-schema and warehouse-schema-rest

* Split actions and actions-rest

* Split collections and collections-rest

* Split `dashboards` and `dashboards-rest`

* Split public-sharing and public-sharing-rest

* Split embedding and embedding-rest; eliminated driver deps: xrays segments sample-data tiles

* Split users and users-rest

* Split setup and setup-rest

* Some more dev functions

* Update Kondo modules config

* Fix test namespace name

* Fix test failure 🔧
2025-11-17 16:35:15 -08:00
Cam Saul
1a73c0ac20 MBQL 5 over the wire (#63913)
* Misc Lib improvements

* Restore deleted function... for now

* N+1 hydration fix

* Update tests

* Test fix 🔧

* Mark more stuff in Legacy MBQL utils as deprecated

* Use Lib for query->source-card

* Update modules config

* Update tests 🔧

* Fix the X-Rays

* Test fix (Druid)

* Druid test fix 🔧

* Appease Kondo

* Normalize Card.dataset_query to MBQL 5

* Cleanup

* Some test fixes 🔧

* Fix tests in the parameters module

* Fix 2 more tests

* Fix most of the Dashboard tests

* All Dashboards tests passing

* Another pass: all tests in parameters module are passing again

* cljfmt

* Kondo

* Kondo

* Revert X-Ray changes

* X-Rays WIP

* Finally all X-Rays tests passing

* Kick CI

* People are writing new code doing legacy MBQL manipulation 😒

* I think everything is working now except for SerDes v1

* Test fixes 🔧

* Handful of test fixes 🔧

* Another test fix 🔧

* Kool fixes; delete SerDes v1

* I think I fixed all the failing tests

* Some Kondo fixes 🔧

* Maybe I fixed everything

* Ready to try CI again

* Restore accidentally-deleted namespace

* Fix almost all my complaints with #63248

* Commit lib-be.hash

* Test fixes

* Another test pass

* Kondo warnings

* Kondo (second pass)

* Fix stray parameter

* Test fix 🔧

* parameters.schema needs to be cljc

* Test fixes 🔧

* Test fixes 🔧

* Another round of test fixes 🔧

* cljfmt

* Kondo

* clj-kondo and cljfmt

* .clj => .cljc

* Fix cljs

* Test fixes 🔧

* Test fixes 🔧

* Add queryToJs() and jsToQuery()

* MySQL test fixes? 🔧

* Schema fix 🔧

* PR feedback

* Add DB migrations

* Support fetching legacy queries

* Init metadata provider cache automatically

* Fix migration

* Fix migrations (again)

* Oops check in missing file

* cljfmt, kondo, test fixes 🔧

* Fix build

* Fix MongoDB table-rows-sample

* Fix search for MySQL

* Appease FE linter

* Fix for internal queries

* MongoDB fix 🔧

* Update JS <=> Cljs query functions to take MP

* cljfmt

* Initial FE changes

* Initial FE changes

* Initial FE changes

* Initial FE changes

* Update FE helpers

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Fix

* Hack

* Fix formatting; normalize before calling lib/query

* Fix for REAL

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix parameters substitution for JS parameter maps

* cljfmt

* Add note

* HACK

* Fix test

* Fix

* Another parameter normalization fix

* Remove X-Rays error

* X-Rays cleanup

* Additional validation for normalizing queries

* Fix

* Fix

* Fix metadata for empty Cards

* Fix

* Fix normalizing :lib/original-binning in :field refs

* Fix

* Correctly normalize MBQL 5 Metric definitions coming from JSON

* Fix

* fromJsQuery should throw on empty queries

* Fix test failure

* Fix

* Fix

* BE test fixes 🔧

* Fix

* Fix more backend tests; Kondo

* Fix

* Allow `=` in X-Rays REST API paths for now

* Fix

* Fix

* Fix

* Set card_id: null for actions

* Fix parameter mappings with card_id = -1

* Set card_id: null for actions

* Remove :lib/original-binning in underlying records drills

* Fix

* Fix

* Misc code cleanup

* Fix transform dependencies native validation

* Fix normalization of template tag :options

* Fix template tag schema

* Improved error message for FK details drill

* Minor tweaks

* Code cleanup

* Thank you Claude bot

* Fix Kondo from #64098

* Fix CLJS test

* Fix CLAUDE.md

* Fix

* Fix

* Don't stomp on valid database IDs with empty ones

* Fix

* Make lib.js/query= work on either JS or Cljs/MBQL 4 or 5

* Fix

* Fix

* Restore normalize

* Restore normalize

* Fix Cljs query caching

* Fix query hash

* Simplify fromJsQuery

* Restore test

* Fix cache

* Fix template tag ordering

* Fix cache issue FOR REALS

* Include batshit amount of nonsense in implicit actions viz settings fields

* Test fix 🔧

* Fix

* Fix

* Fix

* Fix with-template-tags not filtering out invalid tags

* Fix test failure

* Fix

* Fix

* Fix

* MySQL fix deadlocks in tests

* Restore throw code

* Oops

* Rollback connection changes and de-parallelize X-Ray tests

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-10-09 14:45:36 -04:00
Cam Saul
8fa9204d57 Fix formatting for native-query (#64291) 2025-10-02 01:43:18 -07:00
Cam Saul
f6d3a73bb3 Add mbql-5-query macro (#61898)
* Add `mbql-5-query` macro

* Remove new test
2025-08-07 09:39:55 -06:00
Chris Truter
9019aab71e BE support for Table Data Editing (#61490)
Co-authored-by: Ngoc Khuat <qn.khuat@gmail.com>
2025-07-31 08:34:17 +00:00
Oleksandr Yakushev
0ef0f93644 [cljs] Introduce match-lite to reduce CLJS bundle size (#59421)
* [m.lib.fe-util] Introduce match-lite to reduce CLJS bundle size

* [m.lib.filter] Replace match-one with match-lite

* [m.lib.remove-replace] Replace match-one with match-lite

* Replace match-one with match-lite on all CLJC files
2025-07-06 23:41:36 +03:00
Cam Saul
838ae27f16 Unify QP + Lib metadata calculation + 1000 new tests (#59013)
* `annotate` middleware => MLv2

* Test fixes

* Fix #42307

* Add `lib.join/rename-join`

* Continue to iterate on `annotate` rewrite

* Squash #58712

* Less test noise

* Revert "Squash #58712"

This reverts commit 9c8d170aa4.

* Only one test failure to go!

* Add more documentation; code cleanup

* Improved column looping code.

* Test fix 🔧

* Code cleanup

* Use existing Join renaming code.

* FIX QUE-1330

* Fix #30397 / QUE-147

* Kondo cleanup

* Test fixes.

* 13384 assertions, 81 failures, 47 errors.

* 13373 assertions, 48 failures, 28 errors.

* 13400 assertions, 48 failures, 15 errors.

* 13391 assertions, 48 failures, 12 errors.

* 13401 assertions, 22 failures, 11 errors.

* 13404 assertions, 20 failures, 6 errors.

* 13407 assertions, 13 failures, 6 errors.

* 13414 assertions, 11 failures, 8 errors.

* 13412 assertions, 10 failures, 8 errors.

* Minor code cleanup

* Minor code cleanup

* 13412 assertions, 10 failures, 5 errors.

* Fix Kondo errors

* 13411 assertions, 10 failures, 5 errors.

* 13404 assertions, 7 failures, 5 errors.

* 13411 assertions, 3 failures, 5 errors.

* 13399 assertions, 2 failures, 5 errors.

* 13396 assertions, 2 failures, 4 errors.

* 13424 assertions, 2 failures, 2 errors.

* Test cleanup

* Fix deps graph

* Update lib module config

* Cleanup

* Kondo cleanup

* Minimize diff

* 13421 assertions, 3 failures, 2 errors.

* Nice refactor of big hairball test

* More beautiful refactoring

* 13474 assertions, 0 failures, 1 errors.

* Fix linter error

* Remove unused `:aggregation_index` column

* Test fixes

* Test fixes 🔧

* 14547 assertions, 1 failure, 1 error.

* Fix calling the zero arity of unique-name-generator twice

* Handful of test fixes 🔧

* Fix :converted-timezone for :convert-timezone with 3 args instead of 4

* Fix metabase.queries.api.card-test/renamed-column-names-are-applied-to-json-test

* Split up mega test

* Split up another large test

* Fix error message

* Resolve #39887. 14536 assertions, 1 failure, 0 errors.

* WOW! Is everything green now??

* Test fix 🔧

* Update issue IDs

* Update more issue IDs

* PR feedback

* A test fix 🔧

* Another test fix 🔧

* More test fixes 🔧

* Formatting

* Test fixes 🔧

* Test fixes 🔧

* More test fixes 🔧

* Less nonsense

* 6618 assertions, 115 failures, 16 errors. [Lib]

* 6637 assertions, 3 failures, 16 errors.

* 8208 assertions, 3 failures, 0 errors. [Lib]

* Almost ready??

* [Lib] 8216 assertions, 0 failures, 0 errors.

* [QP] 5330 assertions, 21 failures, 31 errors.

* [QP] 5344 assertions, 8 failures, 2 errors

* Fix QUE-1380

* Fix QUE-1410

* [QP] 5344 assertions, 8 failures, 1 errors.

* 5345 assertions, 2 failures, 1 error.

* Proper deduplication in field resolution; also, add some normalization tests

* 13563 assertions, 1 failure, 0 errors.

* 13579 assertions, 0 failures, 0 errors.

* Kondo & cljfmt

* Kondo

* Test fixes 🔧

* Disallow duplicate expression names (QUE-1412)

* Test fixes 🔧

* Test fix

* Fix QUE-1418

* Fix error messages about inline-value with MongoDB

* Fix Redshift test failure

* Fix Athena test

* Fix BigQuery tests

* Fix dumb test failure

* Card source-model-cols should work for Cards without a query.

* Fix MongoDB

* Fix Druid

* Fix some busted code formatting.

* Fix column names

* Fix column names

* Do type inference for native queries with MBQL stages if the driver returns all :type/*

* Fix column names

* Fix column names

* Fix column names

* Druid test fixes 🔧

* More test fixes 🔧

* Update more FE tests

* MBQL 5 map normalization should not normalize nil values

* Support new `:decode/mock` key for mock metadata provider

* Split up unrelated large test

* Don't add :was-binned false to refs

* Clean up the display name calculation logic for column metadata

* Update binning middleware to use 'better' column resolution logic in lib.field.resolution

* Don't calculate different display names in QP results metadata

* Properly convert join :source-metadata

* Update expected display name

* Revert making test too complicated

* Simplify the remove-inactive-field-refs middleware

* Misc code cleanup and test fixes 🔧

* Appease whitespace linter

* Add test to make sure Lib result metadata merges in :info :metadata/model-metadata

* Literally an insane number of new tests

* Add `:lib/original-display-name` to column metadata schema

* Improve error message for fix-bad-references when you use Field ID ref with native source query

* Improved field resolution logic

* Card should NOT add :lib/original-display-name all willy-nilly

* Add `:lib/source-display-name` and `:lib/ref-display-name`

* FINALLY fix display name logic??

* Revert making things private (thanks for lying to me LSP)

* Test fixes 🔧

* Remove `:lib/hide-bin-bucket?`

* Test fix

* Update notebook helpers

* Always use LONG display names for columns from the previous stage.

* Fix metabase.query-processor-test.nested-queries-test/space-names-question-test

* Make sure we use correct display names for implicitly joined columns

* Make sure BINNING gets propagated with `:lib/original-binning`.

* Make sure we correctly calculate if a column is inherited or not.

* Make sure binning info is returned in QP results and other misc fixes

* Do NOT return join alias info for columns that come from implicit joins.

* Update tests

* Some test fixes

* Don't generate wacky default join aliases

* Test fixes 🔧

* Fix more tests

* Prettier

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Fixes

* Use 'Unknown Field' as display name for unknown fields

* Fix incorrect use of expression refs

* Mark selected columns correctly

* cljfmt

* Update/fix backend tests again

* More fix selection fixes 🔧

* Fix equality matching for join columns

* Update tests

* Fix Kondo

* Fix line-bar-tooltips.cy.spec.js

* Add transducer version of u/index-by

* Some PR feedback

* Fix joins-reproductions.cy.spec.js 🔧

* Kondo cleanup

* Fix multiple-column-breakouts.cy.spec.ts

* Update tests

* Update tests not to expect :ident

* Update test not to expect duplicate columns

* PR feedback.

* More test fixes.

* IDK, maybe this is the last round of fixes. 🔧

* Support normalizing parameter dimensions

* Test fixes 🔧

* Fix CLJS code

* One last fix for column equality

* Update a couple of e2e tests

* Another test update

* Fix the test

* remove duplicated spec

* Even more tests (1 million tests)

* cljfmt

* Add test to make sure breakoutable-columns does not include remaps

* Fix Kondo

* skip failed tests

---------

Co-authored-by: Alexander Polyankin <alexander.polyankin@metabase.com>
2025-06-27 13:34:43 -07:00
bryan
343dd2c518 Add cljfmt rule for driver/api-replace + run formatter (#59892) 2025-06-27 15:45:57 +00:00
Edward Paget
741cc32efe fix: resolve TODO for empty app db (#58673)
* fix: resolve TODO for with-empty-2h-app-db

* fixup! revert permissions_tests changes

* fixup! keep change to use only public perms api
2025-06-11 19:32:26 +00:00
Cam Saul
ce3b11810c [Backend modularization] move metabase.dashboard-subscription-test (#58114)
* [Backend modularization] move `metabase.dashboard-subscription-test` (DEV-524)

* Fix
2025-05-20 18:28:37 +00:00
Cam Saul
5578b587a5 [Backend modularization] metabase.db => metabase.app-db.core (#58200)
* Remove most outdated :consistent-alias specs

* `metabase.db` => `metabase.app-db.core`

* Kondo fixes 🔧
2025-05-20 05:36:14 -07:00
Cam Saul
c8546e2af3 [Backend modularization] dashboards module (first pass) (#58056)
* [Backend modularization] `dashboards` module

* Move models

* move API namespace
2025-05-16 20:58:47 +00:00
Cam Saul
d7eae1df71 [Backend modularization] parameters module (first pass) (#58043)
* [Backend modularization] `parameters` module (first pass)

* Make sure DB is initialized

* Oops revert the change I made to demo something during BE Guild Sync
2025-05-15 21:15:28 +00:00
Cam Saul
5373dfac4d [Backend modularization] queries module (#57936)
* [Backend modularization] `queries` module

* `metabase.api.query-metadata` => `metabase.queries.metadata`

* Update config & cljfmt

* Make queries API namespace

* cljfmt

* Fix Kondo warnings

* First pass at fixing circular references.

* Second pass for fixing circular refs.

* Third pass at fixing circular references

* Circular refs pass 3

* Circular refs pass 4

* Circular refs pass 5

* Circular refs pass 6

* Fix

* Appease Kondo

* Test fix 🔧

* Appease Kondo

* Test fix 🔧

* Test fix 🔧

* Test fixes 🔧

* Fix reflection warning

* `schema` => `warehouse-schema`

* More test fixes 🔧

* cljfmt

* Fix

* Test fix 🔧

* Test fix 🔧

* Test debugging

* Test fixes

* Test fix 🔧
2025-05-15 13:30:30 +00:00
Cam Saul
272a353462 [Backend modularization] collections module (#57722)
* [Backend modularization] `collections` module (DEV-444)

* Fix wrong namespace

* Fix new metabot v3 code

* Some test fixes. 🔧

* Move test for EE-specific behavior to EE

* Make `/api/collection` tests work correctly from the REPL

* Try to debug failing test

* Fix sanity checc

* Fix Kondo warnings

* Test fix 🔧

* Attempt to debug test failures

* More test failure debugging

* Cleanup

* More test failure debugging

* More test debugging

* Fix private var

* Test fix? 🔧
2025-05-12 20:27:01 -07:00
Cam Saul
a4313c3960 [Backend modularization] Mega Renaming PR 2 (#57565)
* Move `show-database-syncing-modal` into `sync` module (DEV-436)

* `metabase-enterprise.core` => `metabase-enterprise.core.dummy-namespace` (DEV-473)

* `task` module cleanup (DEV-458)

* Fix 🔧

* Test fix 🔧

* Fixes 🔧
2025-05-09 19:44:37 +00:00
Cam Saul
99613cfe0d [Backend modularization] sample-data module (#57511)
* [Backend modularization] `sample-data` module

* Remove duplicate ns form
2025-05-02 11:51:47 -07:00
Cam Saul
1c113a608e [Backend modularization] upload module cleanup (#57414)
* `upload` module cleanup

* Fix MySQL

* More keyword fixes 🔧

* Keep uploads sorted
2025-04-30 15:15:58 -07:00
Cam Saul
6d588fef7a [Backend modularization] embedding module (#57409)
* Embedding module

* Embedding module

* Fix lint errors

* Fix circular references

* Remove reference to renamed namespace
2025-04-29 16:58:58 -07:00
Cam Saul
486a5904a4 [Backend modularization] task-history module (#57369)
* [Backend modularization]  module

* Add init namespaces

* Test fix 🔧

* Test fixes 🔧

* [Backend Modularization] `task-history` module

* cljfmt
2025-04-29 14:57:15 -07:00
Cam Saul
01b2c8c140 [Backend modularization] settings module (#57366)
* [Backend modularization]  module

* Add init namespaces

* Test fix 🔧

* Test fixes 🔧
2025-04-29 13:32:18 -07:00
metamben
f786d876bb Wait a bit longer in util.queue tests to let them pass in CI (#56681)
* Wait a bit longer in util.queue tests to let them pass in CI
2025-04-15 13:32:41 +00:00
John Swanson
e22e19509c Allow impersonated users to hit cache again (#54521)
* Allow impersonated users to hit cache again

As part of this I refactored a bit: `impersonation` is now its own
module, used by the `advanced-permissions` module.

The real changes are in:

- `middleware.cache`, where we're no longer not caching impersonated users,

- `metabase.impersonation.middleware`, where we're adding a key to the
  query if it'll be impersonated, and

- `metabase.query-processor.util/select-keys-for-hashing`, where we're
  selecting that key as part of the query hash.

- a new test in `metabase-enterprise.impersonation.cache-test`, an e2e
  test which verifies that impersonated users get a different cache than
  non-impersonated users.

* Fix throwing when sandbox/gtap both enforceable

`enforce-impersonations?` was returning `false` because due to the
sandbox, we had "unrestricted" data access from another group (the
sandboxed group).

i refactored a bit:

- `enforced-impersonations-for-db?` now is responsible for throwing in the
sandbox conflict case, rather than `connection-impersonation-role`.

- this way, if there's a conflicting sandbox, we'll throw before we even
check to see whether those impersonations will be enforced (rather than
checking and deciding "nope, they have unrestricted access so we won't
enforce them.")

* kondo yay
2025-03-03 05:36:36 -08:00
Chris Truter
59974f065a Helper to simplify retrying jobs on failure (#53960) 2025-02-19 16:55:51 +00:00
Cam Saul
c14d89e731 [Backend modularization] public-sharing module and fix bad config c… (#53800)
* [Backend modularization] `public-sharing` module and fix bad config changes

* One more pass

* Another pass
2025-02-15 06:07:23 +00:00
Cam Saul
d58ba412ae [Backend modularization] session module (#53718)
* [Backend modularization] `session` module

* Add CODEOWNERS
2025-02-14 10:08:03 -07:00
Cam Saul
3b627d1bb9 [Backend modularization] More pulse module cleanup (#53579)
* [Backend modularization] `pulse` module cleanup

* Move Pulse API endpoints into `pulse` module

* Move metabase.api.alert into `pulse` module

* Fix docstring

* Move Card and Dashboard pulse-updating code into the `pulse` module

* cljfmt
2025-02-13 20:44:50 +00:00
Cam Saul
c9d6609021 [Backend modularization] More search module cleanup (#53269)
* [Backend modularization] Search module cleanup

* Sort namespaces
2025-02-06 14:19:08 +02:00
Cam Saul
ee16b43e3b [Backend modularization] permissions module (#52868)
* Squash

* Add missing API namespace

* Well moving the tests seemed to fix stuff

* Test fix 🔧
2025-02-01 04:14:03 +00:00
Cam Saul
d27bcffb5f OpenAPI dox generation part 2 (#52998)
* OpenAPI dox generation part 2

* Fix docstring

* metabase.billing.billing => metabase.billing.api

* Fix dox generation code fr fr

* Revert changes to dox for now

* Remove define-routes

* Fix missing routes

* Fix even more missing routes

* Third time's a charm

* Remove extra newlines at end of file
2025-01-30 17:41:35 -08:00
Cam Saul
39a58d6311 [Backend modularization] parcel out async module (#52227) 2025-01-15 21:41:43 +00:00
Cam Saul
ac58570ae0 [Backend modularization] actions module cleanup (#52170) 2025-01-14 20:10:46 -08:00
Cam Saul
41b212a654 [Backend modularization] metabase.server.core and metabase.request.core API namespaces; update Kondo (#50839)
* WIP

* metabase.request.cookies namespace

* Server API namespace

* `metabase.server` => `metabase.server.instance`

* Reformat code

* Revert indentation changes

* Unrevert comment

* Oops delete moved file

* Don't be lazy CAM!!!

* Add TODO

* Please cljfmt

* Bump Kondo version to fix metadata ignores in namespaces being ignored

* Update Kondo and enable a few more linters

* Update Clojure linux install script location

* Ok so apparently the old URL does work

* Make sure things live in the right places

* Why do I always have to clean up other people's messes

* Fix formatting

* People need to knocc it off with writing slow tests

* Fix another test that took 45 SECONDS

* Fix Kondo warning
2024-12-07 09:35:13 +00:00
Cam Saul
6024bf019c Collapse metabase.shared.* namespaces (#48646)
* Collapse `metabase.shared.*` namespaces

* Fix Kondo warnings

* Does updating the stories-data keys fix the failing tests?

* Appease msgcat

* Appease msgcat

* Fix typo

* Make the build happy

* Appease fslint
2024-10-14 10:06:10 -07:00
Cam Saul
cd4d764632 🏎️🚀🏎️🚀 🏎️🚀 SHAVE 7 MINUTES OFF OF NON-CORE DRIVER TEST RUNS IN CI 🏎️🚀🏎️🚀 🏎️🚀 (#47681)
* Parallel driver tests PoC

* Set fail-fast to false for now

* Try splitting up non-driver tests to see how broken tests are

* Whoops fix plain BE tests

* Ok nvm I'll test this in another branch

* Fix fail-fast

* Experiment with the improved Hawk split logic

* Fix some broken/flaky tests

* Experiment: try splitting MySQL 8 tests into FOUR jobs

* Divide other Postgres and MySQL tests up and use num-partitions = 2

* Another test fix 🔧

* Flaky test fix 🔧

* Try making more stuff fast

* Make athena fast??

* Fix a few more things

* Test fixes? 🔧

* Fix configs

* Fix Mongo job syntax

* Fix busted test from #46942

* Fix Mongo config again

* wait-for-port needs to specify shell I guess

* More cleanup

* await-port can't have a timeout-minutes I guess

* Let's only parallelize MySQL for now.

* Cleanup action

* Cleanup wait-for-port action

* Fix another flaky test

* NOW driver tests will be FAST

* Need to mark driver tests too

* Fix wrong tag

* Use Hawk 1.0.5

* Fix busted metabase.public-settings-test/landing-page-setting-test

* Fix busted `metabase.api.database-test/get-database-test` etc. (hopefully)

* Fix busted `metabase.sync.sync-metadata.fields-test/sync-fks-and-fields-test` for Oracle

* Maybe this fixed `metabase.query-processor.middleware.permissions-test/e2e-ignore-user-supplied-perms-test` maybe not

* Fix busted metabase.api.dashboard-test/dependent-metadata-test because endpoint had differemt sort order than test

* Ok my test fix did not work

* Fix metabase.sync.sync-metadata.fields-test/sync-fks-and-fields-test for Redshift

* Better test name

* More test fixes 🔧

* Schema fix

* PR feedback

* Split off test partitioning into separate PR

* Fix failing Oracle tests

* Another round of test fixes, hopefully

* Fix failing Redshift tests

* Maybe the last round of test fixes

* Fix Oracle

* Fix stray line
2024-10-08 04:32:12 +00:00
lbrdnk
bd2d8479d9 Revert "Add :legacy/merge-indents? to .cljfmt.edn (#47345)" (#47357)
This reverts commit 3759c8d46a.
2024-08-28 15:32:41 +00:00