Skip to content

Commit

Permalink
Upgrade Metabase (#22)
Browse files Browse the repository at this point in the history
* #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
  • Loading branch information
kaklakariada authored Jan 18, 2022
1 parent 47a84ae commit 8c85a7d
Show file tree
Hide file tree
Showing 11 changed files with 24 additions and 69 deletions.
7 changes: 0 additions & 7 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -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
}
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion doc/changes/changes_0.2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion doc/developer_guide/developer_guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
@@ -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"
Expand All @@ -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"]}
Expand Down
2 changes: 1 addition & 1 deletion resources/metabase-plugin.yaml
Original file line number Diff line number Diff line change
@@ -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
Expand Down
52 changes: 0 additions & 52 deletions scripts/exclude_tests.diff
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions scripts/install-metabase-jar.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"

Expand Down
2 changes: 1 addition & 1 deletion scripts/run-integration-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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/"
Expand Down

0 comments on commit 8c85a7d

Please sign in to comment.