Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Oct 08, 2024
    • 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
      cd4d7646
  2. Oct 07, 2024
  3. Oct 04, 2024
  4. Oct 03, 2024
  5. Oct 01, 2024
  6. Sep 30, 2024
    • Noah Moss's avatar
    • John Swanson's avatar
      Do not cache all token check failures (#48147) · 0ef2052f
      John Swanson authored
      * Do not cache all token check failures
      
      We want to cache token checks to avoid an issue where we repeatedly ask
      the store "hey, is this token valid?? is this token valid?? is this
      token valid??" for the same token.
      
      However, transient errors can also occur. For example, maybe a network
      issue causes the HTTP request to fail entirely. In this case, if we
      cache the result, the user needs to restart metabase (or wait 5 minutes
      until the cache is cleared) before they can attempt to validate their
      token again.
      
      This PR moves the cache logic deeper into the stack. We want to cache
      "successful" responses from the store API - cases where the store has
      told us categorically that the token is or is not valid. We don't want
      or need to cache other things that might happen. Maybe your token isn't
      the right length - we can recalculate that, it's ok. Maybe you get a 503
      error from the Store - we should let you retry. Maybe your network is
      having issues and you can't contact the Store at all - again, we should
      let you retry.
      
      The one potential issue I see here is that if the store goes down, we'll
      massively increase the number of requests we send to the store,
      potentially making it harder to recover. If this is a concern, I can add
      a circuit breaker: if we repeatedly get errors back from the store, back
      off and stop making requests for a while.
      
      * Add a circuit breaker to store API requests
      
      In the pathological case where the store goes down for >5 minutes, the
      cache will expire and all instances everywhere will start repeatedly
      making requests for token validation at once. This might make recovering
      from an outage more difficult.
      
      This adds a circuit breaker around the API request. If the call
      repeatedly throws (5XX errors, socket timeouts, etc.) then we'll pause
      for 1 minute, during which time all calls to token validation will
      immediately fail without making any request to the API.
      
      After one minute, we'll allow one request through to the API. If it
      succeeds, we'll go back to normal operation. Otherwise, we'll wait
      another minute.
      0ef2052f
    • Noah Moss's avatar
  7. Sep 27, 2024
  8. 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
      c04928d5
    • Chris Truter's avatar
    • Oleksandr Yakushev's avatar
      perf: Improve the performance of /api/collection/tree when there are many collections (#48026) · 402ddc7e
      Oleksandr Yakushev authored
      * perf: Faster is-trash? for collections
      
      * perf: Faster annotate-collections and collections->tree
      
      * perf: Optimize path generation in collection->tree
      402ddc7e
    • Oleksandr Yakushev's avatar
  9. Sep 25, 2024
    • Noah Moss's avatar
      Migrate stats ping to Snowplow (#47823) · 2173e659
      Noah Moss authored
      
      Co-authored-by: default avatarThomas Schmidt <thomas@metabase.com>
      2173e659
    • John Swanson's avatar
      Require `:encryption` for string settings (#48067) · 7e00dc32
      John Swanson authored
      * Require `:encryption` for string settings
      
      For settings that are not typed as JSON, CSV, or strings, encryption now
      defaults to `:no` (*except* if you have
      explicitly marked your setting as `:sensitive?` - these will default to
      `:when-encryption-key-set`).
      
      I went through all our settings and provided what I think are reasonable
      values here. I tried to be conservative - when I wasn't sure whether a
      stored setting was sensitive, I kept it as encrypted. For example, the
      `ldap-port` setting is probably non-sensitive but theoretically someone
      could be using a weird port for security-by-obscurity, so I kept that
      encrypted.
      
      * Change possible values for `:encryption`
      
      `:maybe` was confusing: let's be more explicit that the value will be
      encrypted `:when-encryption-key-set` to make it obvious what actually
      turns encryption on and off.
      7e00dc32
  10. Sep 24, 2024
    • Romeo Van Snick's avatar
      Verified metrics (#47886) · 7ffdd997
      Romeo Van Snick authored
      * Support skipToken in useFetchMetrics
      
      * WIP
      
      * Add user setting for verified metrics
      
      * Add verified metrics to the VERIFIED_CONTENT plugin
      
      * Use metric plugins for verified metrics
      
      * Move helpers down
      
      * Do not filter for verified metrics if there are none, regardless of user setting
      
      * Add label to filter button
      
      * Revalidate search when card gets (un-)verified
      
      * Add e2e test for verified metrics
      
      * Avoid checking for verified metrics on when content-verification is not enabled
      
      * Fix broken test
      
      * Simplify content verification plugin structure for metrics
      
      * Add content moderation types and API helpers
      
      * Update content moderation plugin to make use of the moderation api in metabase/api
      
      * Fix lint
      
      * Fix missing list tag
      
      * Store verified metric filter preference
      
      * Move all helpers to the bottom
      
      * Ensure the user setting gets updated when chaning the filter
      
      * Add comment about component similarity
      
      * Undo changes to embedding-sdk
      7ffdd997
    • Chris Truter's avatar
      56396355
    • Chris Truter's avatar
      7f45d2d2
  11. Sep 23, 2024
  12. Sep 20, 2024
  13. Sep 18, 2024
  14. Sep 17, 2024
  15. Sep 13, 2024
    • metamben's avatar
      Fix ordering by the accumulated column (#47875) · 1174d9cc
      metamben authored
      1174d9cc
    • metamben's avatar
      Ensure :effective-type for columns from an aggregation in a card (#47936) · d8786ffc
      metamben authored
      * Ensure :effective-type for columns from an aggregation in a card
      
      Fixes #47184
      
      * Synchronize effective-type with the base-type on override
      
      When :base-type in the column metadata is overridden with the :base-type in the field ref, set it as :effective-type
      too.  If :effective-type is also set in the field ref, it wins.
      d8786ffc
    • Phoomparin Mano's avatar
      feat(sdk): add visual cues in sdk around evaluation usage and feature flags (#47821) · c7bd308b
      Phoomparin Mano authored
      
      * add license problem hook
      
      * add warning banner
      
      * style cue component
      
      * update cue component
      
      * report issue to console
      
      * report issue to console
      
      * use sdk loader for pre-initialization
      
      * extract print problem method
      
      * use non-standard shadows
      
      * add unit tests
      
      * prevent console log spam during tests
      
      * mock the embedding token feature
      
      * mock the embedding token feature by default
      
      * add more test cases
      
      * add test case
      
      * add test cases
      
      * increase popover z-index
      
      * simplify test setup
      
      * simplify test setup
      
      * do not load individual component when a license error happens
      
      * move SdkLicenseProblemDisplay component out
      
      * replace colors with color-mix
      
      * replace colors with color-mix
      
      * make the text unthemed to ensure legibility
      
      * hard-code colors to prevent them from being themed
      
      * hard-code colors to prevent them from being themed
      
      * update border styles
      
      * make the chevron unthemed
      
      * unset console text color
      
      * only set stroke on errors
      
      * optimistic query settings
      
      * document the sdk license condition
      
      * remove redundant condition
      
      * add notes on api keys always being allowed on localhost
      
      * move the no auth method message to warning component
      
      * rename sdk license problem to usage problem
      
      * add eslint rule for stories
      
      * rename sdk license problem to usage problem
      
      * move sdk usage problem display out of the init controller
      
      * specify fallback font if instance is down or CORS error
      
      * add comments on conditions pending on the CORS PR
      
      * add notes on non-localhost checks
      
      * make test ids constant
      
      * add test case for neither provided
      
      * fix types
      
      * address code reviews
      
      * pass `embedding-sdk` flag in `token-features`
      
      * address code review
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      
      * remove appName from console logs
      
      * rename embedding-sdk to embedding_sdk
      
      * add the embedding_sdk premium token feature
      
      * do not setup enterprise plugin in sdk test
      
      * do not localize visual cue messages
      
      * fix unit test in setup-sdk-auth
      
      * rename tests
      
      * remove unused eslint-disable
      
      * enable embedding_sdk premium feature for sdk unit tests
      
      * revert security_test.clj to use embedding instead of embedding-sdk
      
      * remove unneeded test
      
      * changes to support the style leak fixes
      
      ---------
      
      Co-authored-by: default avatarMahatthana (Kelvin) Nomsawadi <me@bboykelvin.dev>
      c7bd308b
    • appleby's avatar
      Revert to non-truncating mbql.u/unique-name-generator in annotate-native-cols (#47866) · 16e31051
      appleby authored
      
      * Rollback to legacy unique-name-generator in annotate-native-cols
      
      * Add native query long column alias test to nested queries tests
      
      * Add native query long column alias test to dataset api tests
      
      * Add native query long column alias test to models e2e tests
      
      * Move limit into inner native query
      
      * PR suggestion: simplify lambda argslist
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      
      * PR suggestion: remove unnecessary mt/with-temp-copy-of-db
      
      * Tweak test name
      
      ---------
      
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      16e31051
Loading