Skip to content
Snippets Groups Projects
This project is mirrored from https://github.com/metabase/metabase. Pull mirroring updated .
  1. 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
  2. Dec 12, 2022
  3. Dec 10, 2022
  4. Dec 09, 2022
  5. 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
  6. Nov 29, 2022
    • Cam Saul's avatar
      Athena driver (#26301) · a32bb77b
      Cam Saul authored
      * Include Amazon Athena support for dacort/metabase-athena-driver
      
      * Use Metabase Maven repo to fetch Athena driver
      
      * Copy test extensions from Damon's Athena driver repo
      
      * Some code cleanup.
      
      * Move namespaces => metabase.driver.athena
      
      * Clean up the test extensions namespace
      
      * 42 failures, 16 errors
      
      * Fix regex support; disable a few tests
      
      * Minor tweaks
      
      * Fix data-source-name
      
      * Fix :week and :day-of-week impls (mostly): 2 failures, 3 errors
      
      * Fix OFFSET, :week-of-year; skip test that has TIME column
      
      * Add Athena to CircleCI config. Don't wait for Java 11 tests to finish before driver tests.
      
      * ALL TESTS ARE PASSING! <3
      
      * Copy fixes for https://github.com/dacort/metabase-athena-driver/issues/115;
      
       add test
      
      * We don't need to prep source files or fetch dependencies before running backend tests.
      
      * Fix Eastwood error.
      
      * Tweak CircleCI config.
      
      * Fix TIMESTAMP WITH TIME ZONE
      
      * Include the Athena/Redshift repos in the build-drivers deps.edn
      
      * Build and release scripts need to have the :mvn/repos as well
      
      * Revert change that enabled test for Presto
      
      * Un-enable failing test for Snowflake as well.
      
      * moves all is clauses into the test
      
      - previously only the first few tests were being run
      
      * Sort ns in `metabase.driver.athena-test`
      
      * Prevent athena's log4j2.properties file from becoming log config
      
      athena includes log4j2.properties top-level with the properties:
      
      ```
      status = debug
      rootLogger.level=debug
      ```
      
      And this kills our beautifully crafted logging. Set
      "log4j2.configurationFile" in bootstrap to our own log4j2.xml.
      
      Log4j2 looks in a few places for its logging config, the first of which
      is the properties file. So when the jar is loaded, log4j2 considers this
      a logging config change and we lose our logging.
      
      Co-authored-by: default avatarDamon P. Cortesi <d.lifehacker@gmail.com>
      Co-authored-by: default avatarBryan Maass <bryan.maass@gmail.com>
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      Unverified
      a32bb77b
  7. 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
  8. Jul 21, 2022
  9. Jul 19, 2022
    • Cam Saul's avatar
      Implement `:bulk/update` Action (backend) (#24036) · bd913c87
      Cam Saul authored
      * `:bulk/update`
      
      * Some refactoring. Add error handling and tests for `:bulk/update`
      
      * Remove unused namespace
      
      * PR feedback and some bug fixes
      
      * Make sure bulk/delete fails if you have all PK columns and also non-PK columns
      
      * Implement caching mechanism for Actions
      
      * Fix more `bulk/delete` tests for Postgres
      
      * Disable kondo error for `u/key-by` being deprecated
      
      * Fix duplicate test setup code in `bulk/delete` tests
      
      * Fix CircleCI job skipping magic: `$CIRCLE_STAGE` has been renamed to `$CIRCLE_JOB`
      
      * Fix Presto JDBC failures from `NOT NULL` column
      
      * Fix GA Card Save expected status code
      
      * Fix error message differences between Postgres versions
      
      * Update Snowflake DDL statements tests
      
      * Fix redundant `let` expressions
      
      * handle different error messages for different PG versions
      Unverified
      bd913c87
    • Cam Saul's avatar
      Fix CircleCI job skipping magic: `$CIRCLE_STAGE` has been renamed to `$CIRCLE_JOB` (#24128) · 95cd7f25
      Cam Saul authored
      * Fix CircleCI job skipping magic: `$CIRCLE_STAGE` has been renamed to `$CIRCLE_JOB`
      
      * Bust cache if `$CIRCLE_JOB` is unset
      
      * Print message if `$CIRCLE_JOB` is unset and we're busting the cache
      
      * Fix GoogleAnalytics status code
      Unverified
      95cd7f25
  10. Jun 27, 2022
  11. Jun 24, 2022
  12. Jun 21, 2022
  13. Jun 20, 2022
  14. Jun 17, 2022
  15. Jun 15, 2022
  16. Jun 13, 2022
  17. Jun 08, 2022
  18. Jun 06, 2022
  19. Jun 03, 2022
  20. Jun 02, 2022
  21. May 28, 2022
  22. May 27, 2022
  23. May 26, 2022
  24. May 24, 2022
  25. May 23, 2022
  26. May 17, 2022
    • Bryan Maass's avatar
      bumps outdated deps versions to be current + drop support for java 8 (#22567) · c1b73ed6
      Bryan Maass authored
      * bumps outdated deps versions to be current
      
      * un-upgrade h2 and jetty
      
      * un-upgrade joda-time and kixi/stats
      
      * drop Java 8 support in circle CI config
      
      - things that used to rely on be-tests-java-8-ee now rely on be-tests-java-11-ee
      
      * remove java 8 from github health check matrix
      
      * revert toucan to 1.17.0
      
      * revert mariadb java client to 2.7.5
      
      * Back to 18, and handle new behavior
      
      toucan used to just look in *.models.<model-name> for models and just
      give up apparently. I made a feature that toucan will look in a model
      registry to create models rather than using the convention
      https://github.com/metabase/toucan/commit/762ad69defc1477423fa9423e9320ed318f7cfe7
      
      
      but now we're getting errors in these tests about maps vs models.
      
      ```clojure
      revision_test.clj:154
      Check that revisions+details pulls in user info and adds description
      expected: [#metabase.models.revision.RevisionInstance{:is_reversion false,
                                                            :is_creation false,
                                                            :message nil,
                                                            :user
                                                            {:id 1,
                                                             :common_name "Rasta Toucan",
                                                             :first_name "Rasta",
                                                             :last_name "Toucan"},
                                                            :diff
                                                            {:o1 nil, :o2 {:name "Tips Created by Day", :serialized true}},
                                                            :description nil}]
        actual: (#metabase.models.revision.RevisionInstance{:description nil,
                                                            :is_creation false,
                                                            :is_reversion false,
                                                            :user
                                                            {:id 1,
                                                             :first_name "Rasta",
                                                             :last_name "Toucan",
                                                             :common_name "Rasta Toucan"},
                                                            :message nil,
                                                            :diff
                                                            {:o1 nil,
                                                             :o2
                                                             #metabase.models.revision_test.FakedCardInstance{:name
                                                                                                              "Tips Created by Day",
                                                                                                              :serialized
                                                                                                              true}}})
      ```
      
      The only difference here is `:o2` is a
      `metabase.models.revision_test.FakedCardInstance` but still has the same
      keys, `:name`, and `:serialized`. So all is well, we're just able to
      make the model.
      
      So a few different fixes. Some are use `partial=` which doesn't care
      about record/map distinction. Some are just make the model, and some are
      turning them into maps for revision strings (which more closely mimics
      what the real revision stuff does):
      
      ```clojure
      (defn default-diff-map
        "Default implementation of `diff-map` which simply uses clojures `data/diff` function and sets the keys `:before` and `:after`."
        [_ o1 o2]
        (when o1
          (let [[before after] (data/diff o1 o2)]
            {:before before
             :after  after})))
      
      (defn default-diff-str
        "Default implementation of `diff-str` which simply uses clojures `data/diff` function and passes that on to `diff-string`."
        [entity o1 o2]
        (when-let [[before after] (data/diff o1 o2)]
          (diff-string (:name entity) before after)))
      ```
      
      So all in all this change impacts nothing in the app itself, because
      those models follow convention and are correct in
      `metabase.models.<model-name>` and are thus "modelified":
      
      ```clojure
      revision-test=> (revision/revisions Card 1)
      [#metabase.models.revision.RevisionInstance{:is_creation true,
                                                  :model_id 1,
                                                  :id 1,
                                                  :is_reversion false,
                                                  :user_id 2,
                                                  :timestamp #object[java.time.OffsetDateTime
                                                                     "0x77e037f"
                                                                     "2021-10-28T15:10:19.828539Z"],
                                                  :object #metabase.models.card.CardInstance
                                                  {:description nil,
                                                   :archived false,
                                                   :collection_position nil,
                                                   :table_id 5,
                                                   :database_id 2,
                                                   :enable_embedding false,
                                                   :collection_id nil,
                                                   :query_type :query,
                                                   :name "ECVYUHSWQJYMSOCIFHQC",
                                                   :creator_id 2,
                                                   :made_public_by_id nil,
                                                   :embedding_params nil,
                                                   :cache_ttl 1234,
                                                   :dataset_query {:database 2,
                                                                   :type :query,
                                                                   :query {:source-table 5,
                                                                           :aggregation [[:count]]}},
                                                   :id 1,
                                                   :display :scalar,
                                                   :visualization_settings {:global {:title nil}},
                                                   :dataset false,
                                                   :public_uuid nil},
                                                  :message nil,
                                                  :model "Card"}]
      ```
      
      so the model/no-model is just arbitrary distinction in the test. All of
      them in the actual app are turned into models:
      
      ```clojure
      (defn- do-post-select-for-object
        "Call the appropriate `post-select` methods (including the type functions) on the `:object` this Revision recorded.
        This is important for things like Card revisions, where the `:dataset_query` property needs to be normalized when
        coming out of the DB."
        [{:keys [model], :as revision}]
        ;; in some cases (such as tests) we have 'fake' models that cannot be resolved normally; don't fail entirely in
        ;; those cases
        (let [model (u/ignore-exceptions (db/resolve-model (symbol model)))]
          (cond-> revision
          ;; this line would not find a model previously for FakedCard and
          ;; just return the map. But now the registry in toucan _finds_ the
          ;; model defintion and returns the model'd map
            model (update :object (partial models/do-post-select model)))))
      
      (u/strict-extend (class Revision)
        models/IModel
        (merge models/IModelDefaults
               {:types       (constantly {:object :json})
                :pre-insert  pre-insert
                :pre-update  (fn [& _] (throw (Exception. (tru "You cannot update a Revision!"))))
                :post-select do-post-select-for-object}))
      ```
      
      * try using mssql-jdbc 10.2.1.jre11
      
      - Important that we get off the jre8 version
      
      * various fixes that needn't be reverted
      
      * Revert "various fixes that needn't be reverted"
      
      This reverts commit 2a820db0743d0062eff63366ebe7bc78b852e81f.
      
      * go back to using circle ci's java 11 docker image
      
      * java-16 (?) -> java-17
      
      * Revert "go back to using circle ci's java 11 docker image"
      
      This reverts commit b9b14c535a689f701d7e2541081164288c988c4e.
      
      Co-authored-by: default avatardan sutton <dan@dpsutton.com>
      Unverified
      c1b73ed6
  27. May 16, 2022
  28. May 10, 2022
  29. May 04, 2022
  30. Apr 27, 2022
  31. Apr 25, 2022
Loading