This is an automated email from the ASF dual-hosted git repository.

fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-management.git


The following commit(s) were added to refs/heads/main by this push:
     new 9bf65048 switch to kiwiproject consul-client (#548)
9bf65048 is described below

commit 9bf650485425b0a6954aec8d0c27652a1897d2fe
Author: PJ Fanning <[email protected]>
AuthorDate: Tue Nov 18 14:11:16 2025 +0100

    switch to kiwiproject consul-client (#548)
    
    * switch to kiwiproject consul-client
    
    * Create switch-to-kiwiprojects.excludes
    
    * mima
---
 .../switch-to-kiwiprojects.excludes                | 25 ++++++++++++++++++++++
 .../discovery/consul/ConsulServiceDiscovery.scala  | 12 +++++------
 .../bootstrap/discovery/ConsulDiscoverySpec.scala  |  8 +++----
 project/Dependencies.scala                         |  4 ++--
 4 files changed, 37 insertions(+), 12 deletions(-)

diff --git 
a/discovery-consul/src/main/mima-filters/2.0.x.backwards.excludes/switch-to-kiwiprojects.excludes
 
b/discovery-consul/src/main/mima-filters/2.0.x.backwards.excludes/switch-to-kiwiprojects.excludes
new file mode 100644
index 00000000..0204d1e9
--- /dev/null
+++ 
b/discovery-consul/src/main/mima-filters/2.0.x.backwards.excludes/switch-to-kiwiprojects.excludes
@@ -0,0 +1,25 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Issues caused by switch to org.kiwiprojects consul-client
+ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.discovery.consul.ConsulServiceDiscovery.ConsulResponseFutureDecorator")
+ProblemFilters.exclude[MissingTypesProblem]("org.apache.pekko.discovery.consul.ConsulServiceDiscovery$ConsulResponseFutureCallback")
+ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.discovery.consul.ConsulServiceDiscovery#ConsulResponseFutureCallback.fail")
+ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.discovery.consul.ConsulServiceDiscovery#ConsulResponseFutureCallback.future")
+ProblemFilters.exclude[IncompatibleMethTypeProblem]("org.apache.pekko.discovery.consul.ConsulServiceDiscovery#ConsulResponseFutureCallback.onComplete")
+ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.discovery.consul.ConsulServiceDiscovery#ConsulResponseFutureDecorator.asFuture")
+ProblemFilters.exclude[IncompatibleSignatureProblem]("org.apache.pekko.discovery.consul.ConsulServiceDiscovery#ConsulResponseFutureDecorator.this")
diff --git 
a/discovery-consul/src/main/scala/org/apache/pekko/discovery/consul/ConsulServiceDiscovery.scala
 
b/discovery-consul/src/main/scala/org/apache/pekko/discovery/consul/ConsulServiceDiscovery.scala
index 5df883b8..a9294d9d 100644
--- 
a/discovery-consul/src/main/scala/org/apache/pekko/discovery/consul/ConsulServiceDiscovery.scala
+++ 
b/discovery-consul/src/main/scala/org/apache/pekko/discovery/consul/ConsulServiceDiscovery.scala
@@ -14,11 +14,6 @@
 package org.apache.pekko.discovery.consul
 
 import com.google.common.net.HostAndPort
-import com.orbitz.consul.Consul
-import com.orbitz.consul.async.ConsulResponseCallback
-import com.orbitz.consul.model.ConsulResponse
-import com.orbitz.consul.model.catalog.CatalogService
-import com.orbitz.consul.option.QueryOptions
 import org.apache.pekko
 import pekko.actor.ActorSystem
 import pekko.annotation.ApiMayChange
@@ -26,6 +21,11 @@ import pekko.discovery.ServiceDiscovery.{ Resolved, 
ResolvedTarget }
 import pekko.discovery.consul.ConsulServiceDiscovery._
 import pekko.discovery.{ Lookup, ServiceDiscovery }
 import pekko.pattern.after
+import org.kiwiproject.consul.Consul
+import org.kiwiproject.consul.async.ConsulResponseCallback
+import org.kiwiproject.consul.model.ConsulResponse
+import org.kiwiproject.consul.model.catalog.CatalogService
+import org.kiwiproject.consul.option.Options
 
 import java.net.InetAddress
 import java.util
@@ -88,7 +88,7 @@ class ConsulServiceDiscovery(system: ActorSystem) extends 
ServiceDiscovery {
 
   private def getService(name: String) =
     ((callback: ConsulResponseCallback[util.List[CatalogService]]) =>
-          consul.catalogClient().getService(name, QueryOptions.BLANK, 
callback)).asFuture
+          consul.catalogClient().getService(name, Options.BLANK_QUERY_OPTIONS, 
callback)).asFuture
 
 }
 
diff --git 
a/discovery-consul/src/test/scala/org/apache/pekko/cluster/bootstrap/discovery/ConsulDiscoverySpec.scala
 
b/discovery-consul/src/test/scala/org/apache/pekko/cluster/bootstrap/discovery/ConsulDiscoverySpec.scala
index dfde9f54..eb38e798 100644
--- 
a/discovery-consul/src/test/scala/org/apache/pekko/cluster/bootstrap/discovery/ConsulDiscoverySpec.scala
+++ 
b/discovery-consul/src/test/scala/org/apache/pekko/cluster/bootstrap/discovery/ConsulDiscoverySpec.scala
@@ -14,15 +14,15 @@
 package org.apache.pekko.cluster.bootstrap.discovery
 
 import com.google.common.net.HostAndPort
-import com.orbitz.consul.Consul
-import com.orbitz.consul.model.catalog.ImmutableCatalogRegistration
-import com.orbitz.consul.model.health.ImmutableService
 import com.typesafe.config.ConfigFactory
 import org.apache.pekko
 import pekko.actor.ActorSystem
 import pekko.discovery.ServiceDiscovery.ResolvedTarget
 import pekko.discovery.consul.ConsulServiceDiscovery
 import pekko.testkit.TestKitBase
+import org.kiwiproject.consul.Consul
+import org.kiwiproject.consul.model.catalog.ImmutableCatalogRegistration
+import org.kiwiproject.consul.model.health.ImmutableService
 import org.scalatest.BeforeAndAfterAll
 import org.scalatest.concurrent.ScalaFutures
 import org.scalatest.matchers.should.Matchers
@@ -40,7 +40,7 @@ class ConsulDiscoverySpec
     with TestKitBase
     with ScalaFutures {
 
-  private val consul = new ConsulContainer("hashicorp/consul:1.15")
+  private val consul = new ConsulContainer("hashicorp/consul:1.22")
   consul.start()
 
   "Consul Discovery" should {
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index ccefd86d..8d258386 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -47,8 +47,8 @@ object Dependencies {
   val discoveryConsul = Seq(
     "org.apache.pekko" %% "pekko-actor" % pekkoVersion,
     "org.apache.pekko" %% "pekko-discovery" % pekkoVersion,
-    "com.orbitz.consul" % "consul-client" % "1.5.3",
-    "org.testcontainers" % "consul" % "1.21.3" % Test,
+    "org.kiwiproject" % "consul-client" % "1.8.1",
+    "org.testcontainers" % "testcontainers-consul" % "2.0.2" % Test,
     "org.scalatest" %% "scalatest" % scalaTestVersion % Test,
     "org.apache.pekko" %% "pekko-testkit" % pekkoVersion % Test,
     "org.apache.pekko" %% "pekko-slf4j" % pekkoVersion % Test,


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to