Skip to content

Commit 844579c

Browse files
committed
version
1 parent f060b39 commit 844579c

File tree

2 files changed

+15
-8
lines changed

2 files changed

+15
-8
lines changed

scalardb/project.clj

+6-3
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@
1010
[cassandra "0.1.0-SNAPSHOT" :exclusions [org.apache.commons/commons-lang3]]
1111
[cheshire "5.12.0"]
1212
[clj-commons/clj-yaml "1.0.29"]
13-
[com.scalar-labs/scalardb-schema-loader "4.0.0-SNAPSHOT"]]
13+
[com.scalar-labs/scalardb-schema-loader "4.0.0-SNAPSHOT"]
14+
[environ "1.2.0"]]
1415
:repositories {"sonartype" "https://oss.sonatype.org/content/repositories/snapshots/"}
1516
:profiles {:dev {:dependencies [[tortue/spy "2.0.0"]]
1617
:plugins [[lein-cloverage "1.1.2"]]}
@@ -21,12 +22,14 @@
2122
com.azure/azure-cosmos
2223
io.grpc/grpc-core
2324
com.scalar-labs/scalardb-rpc]]]}
24-
:cluster {:dependencies [[com.scalar-labs/scalardb-cluster-java-client-sdk "3.14.0"
25+
:cluster {:dependencies [[com.scalar-labs/scalardb-cluster-java-client-sdk "3.15.2"
2526
;; avoid the netty dependency issue
2627
:exclusions [software.amazon.awssdk/*
2728
com.oracle.database.jdbc/ojdbc8-production
2829
com.azure/azure-cosmos
29-
com.scalar-labs/scalardb-rpc]]]}
30+
com.scalar-labs/scalardb-rpc]]]
31+
:env {:scalardb-cluster-version "3.15.2"}
32+
:plugins [[lein-environ "1.2.0"]]}
3033
:use-jars {:dependencies [[com.google.guava/guava "31.1-jre"]
3134
[org.apache.commons/commons-text "1.10.0"]]
3235
:resource-paths ["resources/scalardb.jar"]}

scalardb/src/scalardb/db/cluster.clj

+9-5
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
(:require [clj-yaml.core :as yaml]
33
[clojure.string :as str]
44
[clojure.tools.logging :refer [info]]
5+
[environ.core :refer [env]]
56
[jepsen
67
[control :as c]
78
[db :as db]]
89
[scalardb.nemesis.cluster :as n])
910
(:import (java.io File)))
1011

11-
(def ^:private ^:const DEFAULT_VERSION "3.14.0")
1212
(def ^:private ^:const CLUSTER_VALUES_YAML "scalardb-cluster-custom-values.yaml")
1313
(def ^:private ^:const DEFAULT_CHAOS_MESH_VERSION "2.7.1")
1414

@@ -58,7 +58,9 @@
5858
(c/exec :helm :repo :add
5959
"scalar-labs" "https://scalar-labs.github.io/helm-charts")
6060
;; Chaos mesh
61-
(c/exec :helm :repo :add "chaos-mesh" "https://charts.chaos-mesh.org"))
61+
(c/exec :helm :repo :add "chaos-mesh" "https://charts.chaos-mesh.org")
62+
63+
(c/exec :helm :repo :update))
6264

6365
(defn- configure!
6466
[test]
@@ -98,10 +100,11 @@
98100
:--set "primary.service.type=LoadBalancer")
99101

100102
;; ScalarDB cluster
101-
(let [chart-version (->> (c/exec :helm :search
103+
(let [version (env :scalardb-cluster-version)
104+
chart-version (->> (c/exec :helm :search
102105
:repo "scalar-labs/scalardb-cluster" :-l)
103106
str/split-lines
104-
(filter #(str/includes? % DEFAULT_VERSION))
107+
(filter #(str/includes? % version))
105108
(map #(nth (str/split % #"\s+") 1))
106109
(sort #(compare %2 %1))
107110
first)]
@@ -129,7 +132,8 @@
129132
seq
130133
(apply c/exec :rm :-f)))
131134
(info "wiping the pods...")
132-
(c/exec :helm :uninstall :scalardb-cluster :postgresql-scalardb-cluster)
135+
(c/exec :helm :uninstall :postgresql-scalardb-cluster)
136+
(c/exec :helm :uninstall :scalardb-cluster)
133137
(c/exec :helm :uninstall :chaos-mesh :-n "chaos-mesh")
134138
(catch Exception _ nil)))
135139

0 commit comments

Comments
 (0)