You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kyuubi.apache.org by ch...@apache.org on 2022/07/27 04:14:53 UTC
[incubator-kyuubi] branch master updated: [KYUUBI #3148] Change etcd docker image to recover arm64 CI
This is an automated email from the ASF dual-hosted git repository.
chengpan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-kyuubi.git
The following commit(s) were added to refs/heads/master by this push:
new 137e818cc [KYUUBI #3148] Change etcd docker image to recover arm64 CI
137e818cc is described below
commit 137e818ccb327c71f9db118a2287a8fd2e65942c
Author: Cheng Pan <ch...@apache.org>
AuthorDate: Wed Jul 27 12:14:44 2022 +0800
[KYUUBI #3148] Change etcd docker image to recover arm64 CI
### _Why are the changes needed?_
The current etcd docker image supports x86 only, so travis fail consistently.
https://hub.docker.com/layers/etcd/pachyderm/etcd/v3.5.2/images/sha256-48c43c7cb17b4a997490508d0ffcc7d3300f7fbbe07b899d6df37f9671dbcb63?context=explore
### _How was this patch tested?_
- [ ] Add some test cases that check the changes thoroughly including negative and positive cases if possible
- [x] Add screenshots for manual tests if appropriate
Test passed on arm64 platform
```
➜ incubator-kyuubi git:(PR_3148) build/mvn clean install -Dtest=none -DwildcardSuites=org.apache.kyuubi.ha.client.etcd.EtcdDiscoveryClientSuite -pl :kyuubi-ha_2.12 -am
```
```
[INFO] --- scalatest-maven-plugin:2.0.2:test (test) kyuubi-ha_2.12 ---
Discovery starting.
Discovery completed in 1 second, 902 milliseconds.
Run starting. Expected test count is: 4
EtcdDiscoveryClientSuite:
- publish instance to embedded zookeeper server
- KYUUBI-304: Stop engine service gracefully when related zk node is deleted
- parse host and port from instance string
- etcd test: set, get and delete
Run completed in 1 minute, 7 seconds.
Total number of tests run: 4
Suites: completed 2, aborted 0
Tests: succeeded 4, failed 0, canceled 0, ignored 0, pending 0
All tests passed.
```
- [x] [Run test](https://kyuubi.apache.org/docs/latest/develop_tools/testing.html#running-tests) locally before make a pull request
Closes #3148 from pan3793/etcd.
Closes #3148
17eaa8fc [Cheng Pan] nit
834a80e3 [Cheng Pan] nit
afb40915 [Cheng Pan] Change etcd docker image to recover arm64 CI
Authored-by: Cheng Pan <ch...@apache.org>
Signed-off-by: Cheng Pan <ch...@apache.org>
---
.../org/apache/kyuubi/engine/spark/WithEtcdCluster.scala | 5 ++++-
.../org/apache/kyuubi/ha/client/DiscoveryClientTests.scala | 4 ++--
.../kyuubi/ha/client/etcd/EtcdDiscoveryClientSuite.scala | 13 ++++++++-----
.../ha/client/zookeeper/ZookeeperDiscoveryClientSuite.scala | 2 +-
.../org/apache/kyuubi/engine/EngineRefWithEtcdSuite.scala | 5 ++++-
5 files changed, 19 insertions(+), 10 deletions(-)
diff --git a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/WithEtcdCluster.scala b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/WithEtcdCluster.scala
index 690f6c9cc..835131a0f 100644
--- a/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/WithEtcdCluster.scala
+++ b/externals/kyuubi-spark-sql-engine/src/test/scala/org/apache/kyuubi/engine/spark/WithEtcdCluster.scala
@@ -38,7 +38,10 @@ trait WithEtcdCluster extends KyuubiFunSuite {
}
override def beforeAll(): Unit = {
- etcdCluster = new Etcd.Builder().withNodes(1).build()
+ etcdCluster = new Etcd.Builder()
+ .withImage("gcr.io/etcd-development/etcd:v3.5.4")
+ .withNodes(1)
+ .build()
etcdCluster.start()
super.beforeAll()
}
diff --git a/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/DiscoveryClientTests.scala b/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/DiscoveryClientTests.scala
index 41bc92f64..4236facd7 100644
--- a/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/DiscoveryClientTests.scala
+++ b/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/DiscoveryClientTests.scala
@@ -35,7 +35,7 @@ import org.apache.kyuubi.service.ServiceState
trait DiscoveryClientTests extends KyuubiFunSuite {
protected val conf: KyuubiConf
- protected def getConnectString(): String
+ protected def getConnectString: String
test("publish instance to embedded zookeeper server") {
val namespace = "kyuubiserver"
@@ -90,7 +90,7 @@ trait DiscoveryClientTests extends KyuubiFunSuite {
conf
.unset(KyuubiConf.SERVER_KEYTAB)
.unset(KyuubiConf.SERVER_PRINCIPAL)
- .set(HA_ADDRESSES, getConnectString())
+ .set(HA_ADDRESSES, getConnectString)
.set(HA_NAMESPACE, namespace)
.set(KyuubiConf.FRONTEND_THRIFT_BINARY_BIND_PORT, 0)
.set(HA_ZK_AUTH_TYPE, AuthTypes.NONE.toString)
diff --git a/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/etcd/EtcdDiscoveryClientSuite.scala b/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/etcd/EtcdDiscoveryClientSuite.scala
index f7348c0a6..840d6edc6 100644
--- a/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/etcd/EtcdDiscoveryClientSuite.scala
+++ b/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/etcd/EtcdDiscoveryClientSuite.scala
@@ -21,8 +21,7 @@ import java.nio.charset.StandardCharsets
import scala.collection.JavaConverters._
-import io.etcd.jetcd.launcher.Etcd
-import io.etcd.jetcd.launcher.EtcdCluster
+import io.etcd.jetcd.launcher.{Etcd, EtcdCluster}
import org.apache.kyuubi.config.KyuubiConf
import org.apache.kyuubi.ha.HighAvailabilityConf.HA_CLIENT_CLASS
@@ -31,12 +30,13 @@ import org.apache.kyuubi.ha.client.DiscoveryClientTests
import org.apache.kyuubi.service.NoopTBinaryFrontendServer
class EtcdDiscoveryClientSuite extends DiscoveryClientTests {
+
private var etcdCluster: EtcdCluster = _
var engineServer: NoopTBinaryFrontendServer = _
- private lazy val _connectString = etcdCluster.clientEndpoints().asScala.mkString(",")
+ private lazy val _connectString = etcdCluster.clientEndpoints.asScala.mkString(",")
- override def getConnectString(): String = _connectString
+ override def getConnectString: String = _connectString
val conf: KyuubiConf = {
KyuubiConf()
@@ -44,7 +44,10 @@ class EtcdDiscoveryClientSuite extends DiscoveryClientTests {
}
override def beforeAll(): Unit = {
- etcdCluster = new Etcd.Builder().withNodes(2).build()
+ etcdCluster = new Etcd.Builder()
+ .withImage("gcr.io/etcd-development/etcd:v3.5.4")
+ .withNodes(2)
+ .build()
etcdCluster.start()
super.beforeAll()
}
diff --git a/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClientSuite.scala b/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClientSuite.scala
index 8b87d4aad..dd6394b5f 100644
--- a/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClientSuite.scala
+++ b/kyuubi-ha/src/test/scala/org/apache/kyuubi/ha/client/zookeeper/ZookeeperDiscoveryClientSuite.scala
@@ -44,7 +44,7 @@ class ZookeeperDiscoveryClientSuite extends DiscoveryClientTests with Kerberized
val zkServer = new EmbeddedZookeeper()
override val conf: KyuubiConf = KyuubiConf()
- override def getConnectString(): String = zkServer.getConnectString
+ override def getConnectString: String = zkServer.getConnectString
override def beforeAll(): Unit = {
conf.set(ZookeeperConf.ZK_CLIENT_PORT, 0)
diff --git a/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefWithEtcdSuite.scala b/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefWithEtcdSuite.scala
index 80bb09e20..c3c6c2f6d 100644
--- a/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefWithEtcdSuite.scala
+++ b/kyuubi-server/src/test/scala/org/apache/kyuubi/engine/EngineRefWithEtcdSuite.scala
@@ -40,7 +40,10 @@ class EngineRefWithEtcdSuite extends EngineRefTests {
override protected def getConnectString(): String = _connectString
override def beforeAll(): Unit = {
- etcdCluster = new Etcd.Builder().withNodes(1).build()
+ etcdCluster = new Etcd.Builder()
+ .withImage("gcr.io/etcd-development/etcd:v3.5.4")
+ .withNodes(1)
+ .build()
etcdCluster.start()
super.beforeAll()
}