Skip to content

Commit

Permalink
Use Metabase 0.46.x, skip tests setting the JVM timezone (#129)
Browse files Browse the repository at this point in the history
* Skip tests setting the JVM timezone
* Cleanup deps.edn and CI update
* Prepare v1.1.1 release

---------

Co-authored-by: metamben <metamben@gmail.com>
Co-authored-by: metamben <103100869+metamben@users.noreply.github.com>
  • Loading branch information
3 people authored Mar 6, 2023
1 parent 844d15c commit 43f9b95
Show file tree
Hide file tree
Showing 8 changed files with 20 additions and 2,835 deletions.
2,826 changes: 1 addition & 2,825 deletions .github/deps.edn

Large diffs are not rendered by default.

9 changes: 4 additions & 5 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
uses: actions/checkout@v2
with:
repository: metabase/metabase
ref: v0.45.3
ref: v0.46.0-RC2

- name: Checkout Driver Repo
uses: actions/checkout@v2
Expand Down Expand Up @@ -65,13 +65,12 @@ jobs:
- name: Prepare stuff for pulses
run: yarn build-static-viz

# Use custom deps.edn containing "user/clickhouse" and "user/test" aliases
# to include driver sources and exclude unwanted tests
# Use custom deps.edn containing "user/clickhouse" alias to include driver sources
- name: Run tests
run: |
mkdir /home/runner/.config/clojure
mkdir -p /home/runner/.config/clojure
cat modules/drivers/clickhouse/.github/deps.edn | sed -e "s|PWD|$PWD|g" > /home/runner/.config/clojure/deps.edn
DRIVERS=clickhouse clojure -X:dev:drivers:drivers-dev:test:user/clickhouse:user/test
DRIVERS=clickhouse clojure -X:dev:drivers:drivers-dev:test:user/clickhouse
- name: Build ClickHouse driver
run: |
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# 1.1.1

### New features

* Metabase 0.46.x compatibility.
* Added [cljc.java-time](https://clojars.org/com.widdindustries/cljc.java-time) to dependencies, as it is no longer loaded by Metabase.

# 1.1.0

### New features
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ Metabase Release | Driver Version
0.41.3.1 | 0.8.1
0.42.x | 0.8.1
0.44.x | 0.9.1
0.45.x | 1.0.4
0.45.x | 1.1.0
0.46.x | 1.1.1

## Creating a Metabase Docker image with ClickHouse driver

Expand Down
3 changes: 2 additions & 1 deletion deps.edn
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
{com.clickhouse/clickhouse-jdbc$http
{:mvn/version "0.4.1"
:exclusions [com.clickhouse/clickhouse-cli-client$shaded
com.clickhouse/clickhouse-grpc-client$shaded]}}}
com.clickhouse/clickhouse-grpc-client$shaded]}
com.widdindustries/cljc.java-time {:mvn/version "0.1.21"}}}
2 changes: 1 addition & 1 deletion resources/metabase-plugin.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
info:
name: Metabase ClickHouse Driver
version: 1.1.0
version: 1.1.1
description: Allows Metabase to connect to ClickHouse databases.
contact-info:
name: ClickHouse
Expand Down
3 changes: 2 additions & 1 deletion src/metabase/driver/clickhouse.clj
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@

(def ^:private default-connection-details
{:user "default", :password "", :dbname "default", :host "localhost", :port "8123"})
(def ^:private product-name "metabase/1.1.0")
(def ^:private product-name "metabase/1.1.1")

(defmethod sql-jdbc.conn/connection-details->spec :clickhouse
[_ details]
Expand Down Expand Up @@ -554,6 +554,7 @@
(defmethod driver/supports? [:clickhouse :standard-deviation-aggregations] [_ _] true)
(defmethod driver/supports? [:clickhouse :set-timezone] [_ _] false)
(defmethod driver/supports? [:clickhouse :foreign-keys] [_ _] (not config/is-test?))
(defmethod driver/supports? [:clickhouse :test/jvm-timezone-setting] [_ _] false)

(defmethod sql-jdbc.sync/db-default-timezone :clickhouse
[_ spec]
Expand Down
2 changes: 1 addition & 1 deletion test/metabase/test/data/clickhouse.clj
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
:ssl false
:use_no_proxy false
:use_server_time_zone_for_dates true
:product_name "metabase/1.1.0"})
:product_name "metabase/1.1.1"})

(defmethod sql.tx/field-base-type->sql-type [:clickhouse :type/Boolean] [_ _] "Boolean")
(defmethod sql.tx/field-base-type->sql-type [:clickhouse :type/BigInteger] [_ _] "Int64")
Expand Down

0 comments on commit 43f9b95

Please sign in to comment.