Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. Feb 23, 2023
  2. Feb 20, 2023
    • Case Nelson's avatar
      Convert H2 driver to honey-sql-2 (#28273) · f827b28e
      Case Nelson authored
      
      * Fix linter
      
      * Make sure we're inlining num in substitution and sum aggregations
      
      * Set hsql version
      
      * Fixing tests
      
      * Fixing tests after the h2 conversion
      
      * Use h2x/extract in h2, fix test differences
      
      * Fixing tests for honeysql2
      
      * Only numbers get inlined
      
      * More test fixes
      
      * Fixing tests
      
      * Undo bad commit
      
      * Inline Ratio must produce doubles or h2 will do integer division where 1/2 = 0
      
      * Fix bad case statement
      
      * We can't run native queries with AS for oracle
      
      ---------
      
      Co-authored-by: default avatarCam Saul <github@camsaul.com>
      Co-authored-by: default avatarCam Saul <1455846+camsaul@users.noreply.github.com>
      Unverified
      f827b28e
  3. Feb 18, 2023
  4. Feb 17, 2023
  5. Feb 10, 2023
  6. Feb 09, 2023
  7. Feb 02, 2023
    • dpsutton's avatar
      Run all tests on mysql/h2/postgres app-db tests (#28000) · 0dd33509
      dpsutton authored
      Originally made all "drivers" tests skip the :mb/once test selected test
      namespaces. But we use the drivers matrix to test the different app-db
      types (mysql, postgres). So this moves the `:exclude-tags [:mb/once]`
      selector off of the drivers job and into particular driver jobs.
      
      ```clojure
      user=> (letfn [(uses-exclude? [[job-name job]]
                       (let [steps (:steps job)]
                         (reduce (fn [uses? step]
                                   (if-let [with (:with step)]
                                     (if (= ":exclude-tags '[:mb/once]'" (:test-args with))
                                       (reduced true)
                                       uses?)
                                     uses?))
                                 false
                                 steps)))]
               (-> (group-by uses-exclude? (:jobs (yaml/from-file ".github/workflows/drivers.yml")))
                   (update-vals (fn [jobs] (map key jobs)))))
      {true (:be-tests-athena-ee
             :be-tests-bigquery-cloud-sdk-ee
             :be-tests-druid-ee
             :be-tests-googleanalytics-ee
             :be-tests-mongo-4-2-ee
             :be-tests-mongo-4-2-ssl-ee
             :be-tests-mongo-5-0-ee
             :be-tests-mongo-5-0-ssl-ee
             :be-tests-mongo-latest-ee
             :be-tests-oracle-18-4-ee
             :be-tests-oracle-21-3-ee
             :be-tests-presto-186-ee
             :be-tests-presto-jdbc-ee
             :be-tests-redshift-ee
             :be-tests-snowflake-ee
             :be-tests-sparksql-ee
             :be-tests-sqlite-ee
             :be-tests-sqlserver-ee
             :be-tests-vertica-ee),
       false (:be-tests-google-related-classpath-ee ;; includes an :only selector
              :be-tests-mariadb-10-2-ee
              :be-tests-mariadb-latest-ee
              :be-tests-mysql-5-7-ee
              :be-tests-mysql-latest-ee
              :be-tests-postgres-ee
              :be-tests-postgres-latest-ee)}
      ```
      
      These maria/mysql/postgres tests all specify `MB_DB_TYPE` so we omit the
      `exclude-tags` selector to run all tests. The only strange one here is
      the `:be-tests-google-related-classpath-ee` job which includes an :only
      selector:
      
      ```yaml
          steps:
          - uses: actions/checkout@v3
          - name: Test Google Related Classpath drivers
            uses: ./.github/actions/test-driver
            with:
              junit-name: 'be-tests-${{ matrix.driver }}-classpath-ee'
              test-args: ':only "[metabase.query-processor-test.expressions-test metabase.driver.google-test metabase.driver.googleanalytics-test]"'
      ```
      Unverified
      0dd33509
  8. Jan 17, 2023
  9. Jan 09, 2023
  10. Jan 03, 2023
    • Case Nelson's avatar
      Mongo remove v3 support (#27176) · 9c6997bb
      Case Nelson authored
      
      * Fix mongo version checking for now
      
      * Add minor versions for comparison
      
      * Handle nil case
      
      * newline
      
      * Replace _
      
      * Use dbms-version semantic-version instead
      
      * Compare only the major and minor version
      
      * Fix mongo database-supports?
      
      * Fix duplicate require
      
      * Fix typo
      
      * Remove expressions from version check
      
      * Fix various mongo expressions
      
      `trim`, `rtrim`, `ltrim` needed to be wrapped in `{"input" expr}` object
      `replace` needed to be wrapped in `{"input" expr "find" ...
      "replacement" ...}' object
      `substring` needed to fill in the 3rd argument, optional in mbql but
      required in mongo. Also to use a 1 based index
      
      * Generalize semantic-version-gte
      
      * Used synced dbms_version for testing feature support
      
      * Expressions are only supported by mongo 4.2+
      
      * Disable some tests
      
      * Fix mongo division
      
      Handle nulls with an upfront condition check.
      Handle multiple divisors.
      
      * Remove unused namespace
      
      * Throw exeception if using replace on mongo < 4.4
      
      * Skip test because of #27249
      
      * Move minimum Mongo CI version to 4.2
      
      * Fix sorting by expressions
      
      $sort needs to come before $project otherwise we can only see the
      projected fields, however expressions are only added in $project.
      
      So now if a sort includes an expression, we will use $addFields to be
      able to sort by that expression.
      
      * Disable tests for expressions inside aggregations
      
      To be addressed by #27275
      
      * Handle aggregation nested in an expression
      
      * Remove :truncation-start workaround
      
      * Enable tests for expressions inside aggregations
      
      * Fix datetime-math-tests
      
      * Make sure dbms_version is included when fetching database for store
      
      * Update doc for replace to indicate it should replace all occurrences
      
      * Fix order-by-test
      
      * Handle embedded special aggregations (#27315)
      
      * Handle embedded special aggregations
      * Preserve aggregation options for nested aggregations
      * Use top-level aggregation name as group name
      
      * Disable nil punning on semantic version check (#27317)
      
      * Optimize produced query for division when dividing by literals
      
      * Rename var
      
      * Use reduce to build division
      
      * Fix reduction
      
      * Clean up formatting and document some details
      
      Co-authored-by: default avatarCallum Herries <hi@callumherries.com>
      Co-authored-by: default avatarTamás Benkő <tamas@metabase.com>
      Co-authored-by: default avatarmetamben <103100869+metamben@users.noreply.github.com>
      Unverified
      9c6997bb
  11. Dec 28, 2022
  12. Dec 26, 2022
  13. Dec 15, 2022
  14. Dec 14, 2022
  15. Dec 13, 2022
    • Nemanja Glumac's avatar
      Migrate Mongo 4.0 and 5.0 driver tests to GitHub Actions (#27147) · 69bac4a8
      Nemanja Glumac authored
      * Migrate Mongo 5 ssl driver test to GitHub Actions
      
      * Migrate Mongo 4 ssl driver test to GitHub Actions
      
      * Make Mongo certificates available
      
      * Try `docker exec` for Mongo 4.0
      
      * Remove `TTY` from the `exec`
      
      * Try overriding the entrypoint
      
      * Include `mongod` in entrypoint
      
      * Quote entrypoint command
      
      * Quote only the command
      
      * Omit `--dbpath`
      
      * Try running the docker container manually
      
      * Detach containers
      
      * Reduce the timeout
      Unverified
      69bac4a8
    • Nemanja Glumac's avatar
      Migrate Presto JDBC driver test to GitHub Actions (#27164) · 682ed04b
      Nemanja Glumac authored
      * Remove Presto 186 config
      
      We've already migrated it to GitHub actions.
      
      * Migrate Presto JDBC driver test to GitHub Actions
      
      * Wait for port to be ready
      
      * Try `presto-jdbc` driver
      
      * Wait for port before creating certificates
      Unverified
      682ed04b
  16. Dec 12, 2022
  17. Dec 10, 2022
  18. Dec 08, 2022
    • Cam Saul's avatar
      Support standard deviation aggregations for MongoDB (#27025) · c39f17fe
      Cam Saul authored
      * MongoDB test data config should not hardcode the user and password we use in CI
      
      * Minor test data interface dox improvements
      
      * Support standard deviation and variance for MongoDB
      
      * Oops I got :expressions mixed up with :expression-aggregations
      
      * Note about calculating variance
      
      * `connection-type` instead of `db-or-server`
      Unverified
      c39f17fe
  19. Nov 24, 2022
  20. Nov 16, 2022
  21. Nov 15, 2022
  22. Nov 11, 2022
  23. Nov 10, 2022
    • Ariya Hidayat's avatar
      Migrate some driver tests to GitHub Actions (#25769) · fd621d7d
      Ariya Hidayat authored
      * Migrate some driver tests to GitHub Actions
      
      * Druid
      * MariaDB 10.2
      * MariaDB latest
      * MongoDB 4.0
      * MongoDB 5.0
      * MongoDB latest
      * MySQL 5.7
      * Postgres 9.6
      * Postgres latest
      * Presto
      * Spark
      * SQLite
      * SQL Server 2017
      
      * Don't use Buildjet runner
      
      * Don't run the driver tests for draft PRs
      
      * Use Buildjet for Spark driver tests
      
      * Use Buildjet for Druid driver tests
      Unverified
      fd621d7d
Loading