From 8c85a7dbab36e8a0171d682217a48b5c4d9f75b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ch=CF=80?= Date: Tue, 18 Jan 2022 10:03:35 +0100 Subject: [PATCH] Upgrade Metabase (#22) * #14 Upgrade to Metabase 0.41.6 * Increment version number of driver * #14: Re-activate date dependent tests These tests are fixed in the new Metabase version * Add changelog entry * Hide unwanted files in vscode --- .github/workflows/ci-build.yml | 7 ---- .github/workflows/integration-tests.yml | 2 +- .vscode/settings.json | 14 +++++++ README.md | 2 +- doc/changes/changes_0.2.0.md | 2 +- doc/developer_guide/developer_guide.md | 2 +- project.clj | 4 +- resources/metabase-plugin.yaml | 2 +- scripts/exclude_tests.diff | 52 ------------------------- scripts/install-metabase-jar.sh | 4 +- scripts/run-integration-tests.sh | 2 +- 11 files changed, 24 insertions(+), 69 deletions(-) create mode 100644 .vscode/settings.json diff --git a/.github/workflows/ci-build.yml b/.github/workflows/ci-build.yml index dfaaa96..abbd4af 100644 --- a/.github/workflows/ci-build.yml +++ b/.github/workflows/ci-build.yml @@ -9,10 +9,6 @@ on: jobs: build: runs-on: ubuntu-latest - env: - # See available versions and checksums at https://github.com/metabase/metabase/releases/ - METABASE_VERSION: 0.41.5 - METABASE_SHA256: 0c7d71cb571354334d5f238869ac861f33a2e20d19ba434515b663b9f63e5cb9 steps: - name: Checkout the repository uses: actions/checkout@v2 @@ -64,9 +60,6 @@ jobs: - name: Install Metabase run: ./scripts/install-metabase-jar.sh - env: - METABASE_VERSION: ${{ env.METABASE_VERSION}} - METABASE_SHA256: ${{ env.METABASE_SHA256 }} - name: Run tests run: lein test diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index f47ac3a..600153a 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -10,7 +10,7 @@ jobs: integration-test: runs-on: ubuntu-latest env: - METABASE_VERSION: 0.41.5 + METABASE_VERSION: 0.41.6 steps: - name: Checkout the repository uses: actions/checkout@v2 diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..e0ff5ae --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,14 @@ +{ + "files.exclude": { + "**/.git": true, + "**/.DS_Store": true, + "**/Thumbs.db": true, + ".clj-kondo/.cache/": true, + ".cpcache/": true, + ".lsp/": true, + ".calva/": true, + }, + "search.exclude": { + "maven_repository/": true + } +} \ No newline at end of file diff --git a/README.md b/README.md index b97fae8..b26db03 100644 --- a/README.md +++ b/README.md @@ -25,6 +25,6 @@ The Exasol Driver for Metabase is an adapter, that allows you to query data from ## Runtime Dependencies -To use the Exasol Driver, you need Metabase Version 0.41.5 or later. +To use the Exasol Driver, you need Metabase Version 0.41.6 or later. Follow the [Metabase installation guide](https://www.metabase.com/docs/latest/operations-guide/installing-metabase.html) to download and install Metabase. diff --git a/doc/changes/changes_0.2.0.md b/doc/changes/changes_0.2.0.md index e0a9360..e4fa799 100644 --- a/doc/changes/changes_0.2.0.md +++ b/doc/changes/changes_0.2.0.md @@ -18,4 +18,4 @@ The release also adds support for Exasol specific data types `INTERVAL`, `GEOMET ## Dependency Updates -(none) +* #14: Upgraded Metabase from 0.41.5 to 0.41.6 diff --git a/doc/developer_guide/developer_guide.md b/doc/developer_guide/developer_guide.md index 89b4d18..1b34f7c 100644 --- a/doc/developer_guide/developer_guide.md +++ b/doc/developer_guide/developer_guide.md @@ -43,7 +43,7 @@ lein --version 1. Checkout Metabase at `$HOME/git/metabase` (= `$METABASE_DIR`) and build it: ```bash - export METABASE_VERSION=0.41.5 + export METABASE_VERSION=0.41.6 cd $HOME/git git clone https://github.com/metabase/metabase.git cd metabase diff --git a/project.clj b/project.clj index 8385ac3..937adcf 100644 --- a/project.clj +++ b/project.clj @@ -1,4 +1,4 @@ -(defproject metabase/exasol-driver "0.1.0" +(defproject metabase/exasol-driver "0.2.0" :description "An Exasol driver for Metabase" :url "https://github.com/exasol/metabase-driver/" :min-lein-version "2.9.7" @@ -14,7 +14,7 @@ :profiles {:provided {:dependencies [[org.clojure/clojure "1.10.0"] - [metabase "0.41.5"]]} + [metabase "0.41.6"]]} :unit_tests {:test-paths ^:replace ["test_unit"]} diff --git a/resources/metabase-plugin.yaml b/resources/metabase-plugin.yaml index 5d980f7..5549b02 100644 --- a/resources/metabase-plugin.yaml +++ b/resources/metabase-plugin.yaml @@ -1,7 +1,7 @@ # Complete list of options here: https://github.com/metabase/metabase/wiki/Metabase-Plugin-Manifest-Reference info: name: Metabase Exasol Driver - version: 0.1.0 + version: 0.2.0 description: Allows Metabase to connect to Exasol databases. dependencies: - class: com.exasol.jdbc.EXADriver diff --git a/scripts/exclude_tests.diff b/scripts/exclude_tests.diff index 471f262..69e1805 100644 --- a/scripts/exclude_tests.diff +++ b/scripts/exclude_tests.diff @@ -86,45 +86,6 @@ index 5608a9b374..044e42a2d2 100644 (deftest format-rows-test (mt/test-drivers (mt/normal-drivers-except dbs-exempt-from-format-rows-tests) -diff --git a/test/metabase/query_processor/pivot_test.clj b/test/metabase/query_processor/pivot_test.clj -index 127e8a609e..43dde7d317 100644 ---- a/test/metabase/query_processor/pivot_test.clj -+++ b/test/metabase/query_processor/pivot_test.clj -@@ -153,33 +153,7 @@ - (is (= 6 (count actual))) - (is (= expected actual)))))))) - --(deftest dont-return-too-many-rows-test -- (testing "Make sure pivot queries don't return too many rows (#14329)" -- (let [results (pivot/run-pivot-query (test-query)) -- rows (mt/rows results)] -- (is (= ["Product → Category" -- "User → Source" -- "Created At" -- "pivot-grouping" -- "Count"] -- (map :display_name (mt/cols results)))) -- (is (apply distinct? rows)) -- (is (= [["Doohickey" "Facebook" "2019-01-01T00:00:00Z" 0 263] -- ["Doohickey" "Facebook" "2020-01-01T00:00:00Z" 0 89] -- ["Doohickey" "Google" "2019-01-01T00:00:00Z" 0 276] -- ["Doohickey" "Google" "2020-01-01T00:00:00Z" 0 100] -- ["Gizmo" "Facebook" "2019-01-01T00:00:00Z" 0 361] -- ["Gizmo" "Facebook" "2020-01-01T00:00:00Z" 0 113] -- ["Gizmo" "Google" "2019-01-01T00:00:00Z" 0 325] -- ["Gizmo" "Google" "2020-01-01T00:00:00Z" 0 101] -- ["Doohickey" "Facebook" nil 4 352] -- ["Doohickey" "Google" nil 4 376] -- ["Gizmo" "Facebook" nil 4 474] -- ["Gizmo" "Google" nil 4 426] -- ["Doohickey" nil nil 6 728] -- ["Gizmo" nil nil 6 900] -- [nil nil nil 7 1628]] -- rows))))) -+; https://github.com/exasol/metabase-driver/issues/14 - - (defn- distinct-values [table col] - (->> (mt/rows diff --git a/test/metabase/query_processor_test/alternative_date_test.clj b/test/metabase/query_processor_test/alternative_date_test.clj index f21aca9a7c..423d0e7bb5 100644 --- a/test/metabase/query_processor_test/alternative_date_test.clj @@ -193,19 +154,6 @@ index 015ff7fdd3..db03598e12 100644 (mt/with-column-remappings [venues.category_id (values-of categories.name)] (let [{:keys [rows cols]} (qp.test/rows-and-cols (mt/format-rows-by [int int str] -diff --git a/test/metabase/query_processor_test/implicit_joins_test.clj b/test/metabase/query_processor_test/implicit_joins_test.clj -index 52f6103ab4..f01540a0e4 100644 ---- a/test/metabase/query_processor_test/implicit_joins_test.clj -+++ b/test/metabase/query_processor_test/implicit_joins_test.clj -@@ -139,7 +139,7 @@ - :filter [:= $receiver_id->users.name "Rasta Toucan"]})))))))) - - (deftest implicit-joins-with-expressions-test -- (mt/test-drivers (mt/normal-drivers-with-feature :foreign-keys :expressions) -+ (mt/test-drivers (disj (mt/normal-drivers-with-feature :foreign-keys :expressions) :exasol) ; https://github.com/exasol/metabase-driver/issues/14 - (testing "Should be able to run query with multiple implicit joins and breakouts" - (mt/dataset sample-dataset - (is (= [["Doohickey" "Facebook" "2019-01-01T00:00:00Z" 0 263] diff --git a/test/metabase/query_processor_test/parameters_test.clj b/test/metabase/query_processor_test/parameters_test.clj index f1de41d12e..4d1adbb3f2 100644 --- a/test/metabase/query_processor_test/parameters_test.clj diff --git a/scripts/install-metabase-jar.sh b/scripts/install-metabase-jar.sh index 81a8370..e9a6492 100755 --- a/scripts/install-metabase-jar.sh +++ b/scripts/install-metabase-jar.sh @@ -5,8 +5,8 @@ set -o nounset set -o pipefail # See available versions and checksums at https://github.com/metabase/metabase/releases/ -metabase_version=${METABASE_VERSION:-0.41.5} -metabase_sha256=${METABASE_SHA256:-0c7d71cb571354334d5f238869ac861f33a2e20d19ba434515b663b9f63e5cb9} +metabase_version=${METABASE_VERSION:-0.41.6} +metabase_sha256=${METABASE_SHA256:-9aa2e8429a39d4ef1fa3e304ce67c85e115392352e6fd35ce279872a087e7108} metabase_download_url="https://downloads.metabase.com/v$metabase_version/metabase.jar" diff --git a/scripts/run-integration-tests.sh b/scripts/run-integration-tests.sh index 3d366b2..c5952c6 100755 --- a/scripts/run-integration-tests.sh +++ b/scripts/run-integration-tests.sh @@ -4,7 +4,7 @@ set -o errexit set -o nounset set -o pipefail -jdbc_driver_version=7.1.3 +jdbc_driver_version=7.1.4 exasol_driver_dir="$( cd "$(dirname "$0")/.." >/dev/null 2>&1 ; pwd -P )" metabase_dir=$(cd "$exasol_driver_dir/../metabase"; pwd) metabase_plugin_dir="$metabase_dir/plugins/"