Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Nov 21, 2024
  2. Nov 20, 2024
  3. Nov 15, 2024
  4. Nov 13, 2024
  5. Nov 11, 2024
  6. Nov 10, 2024
  7. Nov 06, 2024
  8. Nov 04, 2024
  9. Oct 18, 2024
    • Cam Saul's avatar
      Modularize metabase.pulse; add metabase.pulse.core API namespace (#48640) · c92e8c99
      Cam Saul authored
      * Modularize metabase.pulse; add metabase.pulse.core API namespace
      
      * Rename metabase.pulse.send-test
      
      * Split email result attachment stuff into its own namespace
      
      * Update dashboard-subscription-test
      
      * Allow metabase.email.result-attachment externally... for now
      
      * More code cleanup
      
      * Decouple models.card and email.messages
      
      * Decouple models.collection and metabase.email.messages
      
      * Hopefully the last fix :wrench:
      
      * Fix #48647 :slight_frown:
      
      * Fix event handler
      
      * :render/text, not :pulse/text
      
      * Test fixes :wrench:
      
      * Test fix :wrench:
      
      * RESPECT the modules
      
      * Remove unused namespace
      Unverified
      c92e8c99
  10. Oct 15, 2024
    • bryan's avatar
      Adds missing schemas + data for metrics to snowplow stats ping (#48476) · e5c181bd
      bryan authored
      * adds data + schema for metrics stats ping
      
      * remove comment
      
      * annotate todos
      
      * fill in the rest of the metrics values
      
      - and add defaults
      
      * fix some definitions + use a single timestamp
      
      * shuffle stuff around to appease the namespace linter
      
      - we aren't reaching into the api API, so the linter is more of a
        formality here.
      
      * update docstring
      
      * fix jsonschema, maybe
      
      * review responses
      
      - revert changes to 1-0-0
      - add metrics section to new file: 1-0-1
      - bump ::instance_stats to "1-0-1"
      - add tags into 1-0-1
      - make the code return tags (empty for now until we know what to tag things.)
      
      - also fix test that broke from shuffling settings around
      
      * remove a footgun
      
      * add tags to metrics,
      
      add grouped_metrics to jsonschema 1-0-1
      
      format 1-0-1
      
      * indent
      
      * cljfmt
      
      * version should match filename
      
      * update instance stats 1-0-1 schema
      
      * require `tags` in grouped_metric + snowcat comment
      
      * fix formatting noise
      
      * update schema to make it valid
      
      * remove grouped_metrics from instance_stats schema
      
      * cljfmt appeasement
      
      * unbin cache_num_queries_cached value
      
      - alphabetize metrics generation
      
      * we can now guarantee metric values will be ints
      
      * jsonschema for instance_uuid, settings, and grouped_metrics
      
      * add analytics_uuid and make it required
      
      * lint + alphabetize instance stats json schema
      
      * update setting key type
      
      - add maxLength to some strings
      
      * lint jsonschema
      
      - Add description to setting.items.tags
      - add maxLength, and {min,max}imum to setting.items.value
      
      * Bump instance stats to 2-0-0
      
      - remove analytics_uuid string length == 36 check
      - adds assertion to ensure required fields are set (and it passes)
      - adds info for embedding settings
      
      * adds a grouped-metric to stats ping
      
      - adds length info to the schema to pass jsonschema linting
      
      * cljfmt
      Unverified
      e5c181bd
    • Ngoc Khuat's avatar
      Unverified
      1a2a9c81
  11. Oct 14, 2024
  12. Oct 10, 2024
    • Ngoc Khuat's avatar
      [Notification] System event notification (#47857) · fc43d3cd
      Ngoc Khuat authored
      * [Notification] Notification and subscription (#47707)
      
      * [Notification] Notification and subscription (#47707)
      
      * [Notification] Handlers + recipients (#47759)
      
      * [Notification] Channel template table and model (#47782)
      
      * [Notification] Render system event emails (#47859)
      
      * [Notification] Strict type for channel template and notification recipient (#47910)
      
      * [Notification] Event hydration (#47953)
      
      * [Notification] Send asynchronously (#48200)
      Unverified
      fc43d3cd
  13. Oct 08, 2024
    • lbrdnk's avatar
      [Databricks] Address initial remarks (#48377) · 72495873
      lbrdnk authored
      * Address initial remarks
      
      * Extract hive-like to separate module and set it as dependency
      
      * Remove hive-like also from spark
      Unverified
      72495873
    • Cam Saul's avatar
      :race_car::rocket::race_car::rocket: :race_car::rocket: SHAVE 7 MINUTES OFF OF NON-CORE DRIVER TEST RUNS IN CI :race_car::rocket::race_car::rocket: :race_car::rocket: (#47681) · cd4d7646
      Cam Saul authored
      * 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 :wrench:
      
      * Flaky test fix :wrench:
      
      * Try making more stuff fast
      
      * Make athena fast??
      
      * Fix a few more things
      
      * Test fixes? :wrench:
      
      * 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 :wrench:
      
      * 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
      Unverified
      cd4d7646
  14. Oct 07, 2024
    • Case Nelson's avatar
      feat: move auth providers behind ee token (#48245) · eaabfa79
      Case Nelson authored
      * feat: move auth providers behind ee token
      
      Fixes #48235
      
      Introduces new premium feature `database-auth-providers`.
      Moves fetch-auth behind defenterprise - oss will always return an empty
      map.
      Add metabase.util.http to test outbound http requests.
      
      * Fix broken refs
      
      * Drop defmethod as adhoc overrides aren't desirable outside ee
      
      * Drop unessary require
      
      * Fix token and tests
      
      * Fix tests
      
      * Fix formatting
      
      * Fix var cast exception
      
      * Fix connection test
      
      * Move test to ee namespace
      
      * Move more tests behind enterprise
      
      * Fix checked-section hiding
      Unverified
      eaabfa79
  15. Sep 27, 2024
  16. Sep 26, 2024
    • lbrdnk's avatar
      Databricks JDBC driver (#42263) · c04928d5
      lbrdnk authored
      * Databricks JDBC driver base
      
      * Add databricks CI job
      
      * WIP data loading -- it works, further cleanup needed
      
      * Cleanup
      
      * Implement ->honeysql to enable data loading
      
      * Hardcode catalog job var
      
      * Implement driver methods and update tests
      
      * Derive hive instead of sql-jdbc
      
      * Cleanup leftovers after deriving hive
      
      * Run databricks tests on push
      
      * Cleanp and enable set-timezone
      
      * Disable database creation by tests
      
      * Add Databricks to broken drivers for timezone tests
      
      * Exclude Databricks from test
      
      * Enable have-select-privilege?-test
      
      * Restore sql-jdbc-drivers-using-default-describe-table-or-fields-impl post rebase
      
      * Restore joined-date-filter-test
      
      * Adjust to work with dataset definition tests
      
      * Adjust alternative date tests
      
      * Remove leftover reflecttion warning set
      
      * Update test exts
      
      * cljfmt vscode
      
      * Add databricks to kondo drivers
      
      * Update metabase-plugin.yaml
      
      * Update databricks_jdbc.clj
      
      * Rework test extensions
      
      * Update general data loading code to work with Databricks
      
      * Reset tests to orig
      
      * Use DateTimeWithLocalTZ for TIMESTAMP database type
      
      * Convert to LocalDateTime for set-parameter
      
      * Update test extensions field-base-type->sql-tyoe
      
      * Update database-type->base-type
      
      * Enable creation of time columns in test data even though not supported
      
      * Fix typo
      
      * Update tests
      
      * Udpate tests
      
      * Update drivers.yml
      
      * Disable dynamic dataset loading tests
      
      * Adjust the iso-8601-text-fields-should-be-queryable-date-test
      
      * Update load-data/row-xform
      
      * Add time type exception to test
      
      * Update test data loading and enable test
      
      * Whitespace
      
      * Enable all driver jobs
      
      * Update comment
      
      * Make catalog mandatory
      
      * Remove comment
      
      * Remove log level from spec generation
      
      * Update sql.qp/datetime-diff
      
      * Update read-column-thunk
      
      * Remove comment
      
      * Simplify date-time->results-local-date-time
      
      * Update comment
      
      * Move definitions
      
      * Update test extension types mapping
      
      * Remove now obsolete ddl/insert-rows-honeysql-form implementation
      
      * Update sql-jdbc.conn/connection-details->spec for perturb-db-details
      
      * Update load-data/do-insert!
      
      * Remove ssh tunnel from driver as tests do not work with it
      
      * Update test
      
      * Promote ::dynamic-dataset-loading to :test/dynamic-dataset-loading and modify corresponding tests
      
      * Adjust to broken TIMESTAMP_NTZ sync
      
      * Update read-column-thunk to return timestamps always in Z
      
      * Comment
      
      * Disable tests for dynamic datasets
      
      * Return spark jobs into drivers.yml
      
      * Update Databricks CI catalog
      
      * Remove vscode cljfmt tweak
      
      * Update iso-8601-text-fields-expected-rows
      
      * Update datetime-diff
      
      * Formatting
      
      * cljfmt
      
      * Add placeholder test
      
      * Remove comment
      
      * cljfmt
      
      * Use EnableArrow=0 connection param
      
      * Remove comment
      
      * Comment
      
      * Update tests
      
      * cljfmt
      
      * Update driver's deps.edn
      
      * Update tests
      
      * Implement alternative `describe-table`
      
      * WIP Workaround for timestamp_ntz sync, will be thrown away probably
      
      * Update metabase-plugin.yaml with schema filters
      
      * Update driver to use schema filters and remove now redundant sync implemnetations
      
      * Update tests
      
      * Update tests extensions
      
      * Update test
      
      * Add feature flags for fast sync
      
      * Implement describe-fields
      
      * Implement describe-fks-sql
      
      * Enable fast sync features
      
      * Use full_data_type
      
      * Comment
      
      * Add exception for timestamp_ntz columns to new sync code
      
      * Implement db-default-timezone
      
      * Add timestamp_ntz ignored test
      
      * Add db-default-timezone-test
      
      * Fix typo
      
      * Update setReadOnly
      
      * Add comment on setAutoCommit
      
      * Update chunk-size
      
      * Add timezone-in-set-and-read-functions-test
      
      * Drop Athena from driver exceptions
      
      * Use set/intersection instead of a filter
      
      * Add explicit fast-sync tests
      
      * Update describe-fields-sql and add comment
      
      * Add preprocess-additional-options
      
      * Add leading semicolon test
      
      * Disable dataset creation and update comment
      
      * Rename driver to `databricks`
      
      * Use old secret names
      
      * Fix wrongly copied hsql list
      
      * Temporarily allow database creation
      
      * Add *allow-database-deletion*
      
      * Temporarily allow database creation
      
      * Disable database creation
      
      * cljfmt
      
      * cljfmt
      Unverified
      c04928d5
  17. Sep 05, 2024
  18. Aug 30, 2024
    • Ngoc Khuat's avatar
      [notification] webhook for alert (#45201) · d897f201
      Ngoc Khuat authored
      
      * [notification] New method: `channel/can-connect?` (#44955)
      
      * [notification] Channel APIs (#45207)
      
      * [notification] namespaced channel type (#45527)
      
      * [Notification] Render alert for http channel (#45545)
      
      * [notification] Add channel description (#45840)
      
      * [notification] update API to enable http channels for alert (#45839)
      
      * [Notification] Remove channel details for users without write perms (#46034)
      
      * [Notification] Serdes channel (#46031)
      
      * [Notification] Update http details schema (#45960)
      
      * [Notification] Deactivate channels will delete PulseChannel (#46115)
      
      * [Notification] audit log for channel create and update (#46113)
      
      * [Notification] Disallow undefined key for http channel details (#46712)
      
      * [Notification] Handle channel name conflicts (#46818)
      
      * Webhooks Admin Section (#46194)
      
      * [notification] Fix test pulse endpoint does not work properly for http channels (#46474) (#47050)
      
      * [Notification] Fix unable to update multiple channels per type (#47111)
      
      * [Notification] Record Task History when pulse sends channel message (#46218)
      
      * Enabling Webhook Alerts (#47022)
      
      * [Notification] fix cyclic deps (#47379)
      
      * [notification] channel serdes spec (#47386)
      
      Co-authored-by: default avatarNick Fitzpatrick <nick@metabase.com>
      Unverified
      d897f201
  19. Aug 29, 2024
    • Cam Saul's avatar
      Update Kondo to `2024.08.01` and add `deps.edn` aliases to run from the JVM (#47370) · 7fb88340
      Cam Saul authored
      * Add `clojure -M:kondo` and `clojure -M:kondo:kondo/all` and bump version
      
      * Fix Kondo errors
      
      * Fix Kondo+LSP issues with `defendpoint`, `defenterprise`, etc.
      
      * Use replace-deps instead of deps for speed
      
      * Ok apparently maybe we do need to copy configs when we run Kondo on CI
      
      * Oops `./bin/kondo.sh` should not try to use `clj-kondo`
      
      * Remove references to GA driver folders
      Unverified
      7fb88340
  20. Aug 26, 2024
  21. Aug 20, 2024
    • Cam Saul's avatar
      Test defn/defmacro exclamation point linter should also use `:parallel/disallowed` (#46943) · ee25e763
      Cam Saul authored
      * Kondo Config cleanup
      
      * Restore warnings for with-log-messages-for-level until #28827 is merged
      
      * Updated clojure.test hooks
      
      * Fix kondo warning
      
      * Test defn/defmacro exclamation point linter should also use :parallel/disallowed (part 1)
      
      * WIP
      
      * Time for me to learn to spell
      
      * Finish the cleanup
      
      * Remove code I was typing as an example
      
      * Fix renamed var
      
      * Fix the SAML tests
      
      * Fix Kondo warning
      Unverified
      ee25e763
  22. Aug 16, 2024
    • Cam Saul's avatar
      Misc Kondo Config cleanup (#46907) · 23725b4e
      Cam Saul authored
      * Kondo Config cleanup
      
      * Restore warnings for with-log-messages-for-level until #28827 is merged
      
      * Updated clojure.test hooks
      
      * Fix kondo warning
      
      * Time for me to learn to spell
      Unverified
      23725b4e
    • Cam Saul's avatar
      Beautiful log message capturing :star: :heart_eyes_cat: (#28827) · d959430a
      Cam Saul authored
      * Beautiful log message capturing :star: :heart_eyes_cat:
      
      * Don't have log.cljs try to load log.capture, don't know how to make that work
      
      * Remove restriction against use in parallel tests
      
      * Fix tests using invalid syntax
      
      * Port legacy tests
      
      * Make this stuff work with Cljs
      
      * Fix bad syntax
      
      * Convert usages of old version of with-log-messages-for-level to new version
      
      * Update other stuff to use the updated macro
      
      * Fix stuff
      
      * Fix Cljs tests
      
      * Fix world's largest test
      
      * Appease Kondo
      
      * Fix comment
      
      * ClojureScript: only emit capture code in dev builds
      Unverified
      d959430a
  23. Aug 14, 2024
  24. Aug 13, 2024
  25. Aug 07, 2024
    • lbrdnk's avatar
      Add `relative-time-interval` mbql function 2 (#46438) · 582fa9ad
      lbrdnk authored
      * Add :relative-time-interval mbql function
      
      * Add relativeDateFilterPartsRelativeTimeInterval
      
      * Update display-name-method :relative-time-interval
      
      * Update desugar-relative-time-interval
      
      * Define relative-time-filter op
      
      * Add or update tests
      
      * Update tests
      
      * Update display-name-method
      
      * Update test
      
      * Fix positive relative-time-interval shift
      
      * Add checkins:1-per-day:60 dataset
      
      * Update var name
      
      * Bail out from optimization of relative-time-interval desugared filters
      
      * Update dataset kondo hook
      
      * Generate cache required for kondo hooks in kondo.sh
      
      * Rename dataset
      Unverified
      582fa9ad
  26. Aug 05, 2024
    • Chris Truter's avatar
      Various hardenings for SQL analysis (#46432) · 39bb33ec
      Chris Truter authored
      ### Description
      
      This change should fix some explosions in stats due to phantom fields, while also making things a bit more rigorous.
      
      - Record the table schema in query_field - especially useful for unknown tables
      - Allow null table names in query_field - they might be phantoms, or they might not
        - We still have the option to filter them out in tools we build on top
      - Tighten up matching logic to consider schema
      Unverified
      39bb33ec
  27. Aug 01, 2024
  28. Jul 31, 2024
    • John Swanson's avatar
      Some improvements to the REST API for query field validation (#46024) · c4196d99
      John Swanson authored
      * Allow filtering on collection
      
      * Add `effective_ancestors` to collection data
      
      Note: I removed the `qv=` comparator. I think it'.s better to be more explicit
      about what exactly we're asserting. In particular, I hadn't updated the
      `:count` when we were filtering on collection type, so the count was
      still the total for *every* collection even though the results were being
      restricted by the collection. However the `qv=-data` function was still
      reporting that everything was OK, because it was accounting for other
      data from the App DB by just asserting that the count we'd specified was
      lower than the actual count. I'd argue it's better for tests to fail
      locally because I have garbage in my app DB (which I can clean up) than
      succeed when they really shouldn't.
      
      * Consolidate effective ancestors
      
      For the Search API, we're currently returning slightly different
      ancestors:
      
      - it never has the Root Collection, and
      
      - the ancestors don't have a `personal_owner_id`
      
      We could change the API (and maybe will soon - it seems pretty
      unexpected to have `effective_ancestors` sometimes act one way and
      sometimes act another) but for now we can just reshape things to look
      the same as they did before, while using the same code under the hood.
      Unverified
      c4196d99
  29. Jul 30, 2024
    • John Swanson's avatar
      Add an API to get stale dashboards and cards (#44711) · cbbcf4c8
      John Swanson authored
      
      * Make an internal API for retrieving stale content
      
      This introduces the `metabase.stale` module, which has one public
      function (so far): `metabase.stale/find-candidates`. This takes a set of
      `collection-ids`, a cutoff date, and pagination/sort info.
      
      Next, we introduce an HTTP API endpoint that will figure out the appropriate
      set of `collection-ids` for a given user/request, call this function,
      and return the results in the shape we want.
      
      Also: for e2e tests, we need a way to mark a card or dashboard as stale. I
      think the easiest way to do this is to just create a testing endpoint
      that we can call to update the `last_used_at` or `last_viewed_at` of the
      card/dashboard to set it to ~7 months ago.
      
      
      ---------
      
      Co-authored-by: default avatarbryan <bryan.maass@gmail.com>
      Unverified
      cbbcf4c8
  30. Jul 29, 2024
    • Braden Shepherdson's avatar
      [perf] Better CLJC memoization; bounded strategy, fast versions (#46199) · 6e64a3e0
      Braden Shepherdson authored
      Expands and refactors `metabase.util.memoize` to support better cross-platform memoization.
      
      **Better basic memoization**
      
      Use `clojure.core.memoize/memo` (and its clone in CLJS) rather than `clojure.core/memoize` for
      the "everything forever" strategy.
      
      **Bounded memoization**
      
      There are a few places (eg. `u/kebab-case-en`) where we want zero-overhead *hits* and expect the input space
      to be fixed. To guard against runaway memory usage, this **bounded** strategy dumps the entire cache when it
      overflows. It logs an INFO level note when that happens - the intent here is that the threshold should never
      actually get hit!
      
      **Fast JVM versions**
      
      In the special case where the function to memoize takes exactly 1 argument which is a valid map key, we can
      use `ConcurrentHashMap.computeIfAbsent` as the basis of the cache and have much less overhead.
      
      `fast-memo` and `fast-bounded` implement this in CLJ; in CLJS they just call `memo` and `bounded`.
      Unverified
      6e64a3e0
  31. Jul 25, 2024
Loading