Skip to content

Commit

Permalink
chore(dependency): upgrade spring boot from 2.7.x to 3.0.x and spring…
Browse files Browse the repository at this point in the history
… cloud from 2021.0.x to 2022.0.x

Upgrading spring boot 2.7.18 to 3.0.13 and spring cloud 2021.0.8 to 2022.0.5.
Spring cloud release 2022.0.x is compatible with spring boot 3.0.x.
https://github.com/spring-cloud/spring-cloud-release/wiki/Supported-Versions#supported-releases

Unpinning okhttp and rest-assured, as spring boot [3.0.13](https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/3.0.13/spring-boot-dependencies-3.0.13.pom) brings okhttp 4.10.0 and rest-assured 5.2.1.

While upgrading the spring boot and spring cloud, encountered the below errors during build process of kork-jedis module:
```
> Task :kork-jedis:compileJava FAILED
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:23: error: cannot find symbol
import redis.clients.jedis.ScanParams;
                          ^
  symbol:   class ScanParams
  location: package redis.clients.jedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:24: error: cannot find symbol
import redis.clients.jedis.ScanResult;
                          ^
  symbol:   class ScanResult
  location: package redis.clients.jedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:26: error: cannot find symbol
import redis.clients.jedis.commands.BinaryJedisCommands;
                                   ^
  symbol:   class BinaryJedisCommands
  location: package redis.clients.jedis.commands
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:28: error: cannot find symbol
import redis.clients.jedis.commands.MultiKeyCommands;
                                   ^
  symbol:   class MultiKeyCommands
  location: package redis.clients.jedis.commands
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:29: error: cannot find symbol
import redis.clients.jedis.commands.RedisPipeline;
                                   ^
  symbol:   class RedisPipeline
  location: package redis.clients.jedis.commands
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:30: error: cannot find symbol
import redis.clients.jedis.commands.ScriptingCommands;
                                   ^
  symbol:   class ScriptingCommands
  location: package redis.clients.jedis.commands
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:22: error: cannot find symbol
import redis.clients.jedis.commands.BinaryJedisCommands;
                                   ^
  symbol:   class BinaryJedisCommands
  location: package redis.clients.jedis.commands
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:24: error: cannot find symbol
import redis.clients.jedis.commands.MultiKeyCommands;
                                   ^
  symbol:   class MultiKeyCommands
  location: package redis.clients.jedis.commands
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:25: error: cannot find symbol
import redis.clients.jedis.commands.RedisPipeline;
                                   ^
  symbol:   class RedisPipeline
  location: package redis.clients.jedis.commands
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:26: error: cannot find symbol
import redis.clients.jedis.commands.ScriptingCommands;
                                   ^
  symbol:   class ScriptingCommands
  location: package redis.clients.jedis.commands
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:67: error: cannot find symbol
  public <R> R withMultiClient(Function<MultiKeyCommands, R> f) {
                                        ^
  symbol:   class MultiKeyCommands
  location: class JedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:74: error: cannot find symbol
  public void withMultiClient(Consumer<MultiKeyCommands> f) {
                                       ^
  symbol:   class MultiKeyCommands
  location: class JedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:81: error: cannot find symbol
  public <R> R withBinaryClient(Function<BinaryJedisCommands, R> f) {
                                         ^
  symbol:   class BinaryJedisCommands
  location: class JedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:88: error: cannot find symbol
  public void withBinaryClient(Consumer<BinaryJedisCommands> f) {
                                        ^
  symbol:   class BinaryJedisCommands
  location: class JedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:95: error: cannot find symbol
  public void withPipeline(Consumer<RedisPipeline> f) {
                                    ^
  symbol:   class RedisPipeline
  location: class JedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:102: error: cannot find symbol
  public <R> R withPipeline(Function<RedisPipeline, R> f) {
                                     ^
  symbol:   class RedisPipeline
  location: class JedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:109: error: cannot find symbol
  public void syncPipeline(RedisPipeline p) {
                           ^
  symbol:   class RedisPipeline
  location: class JedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:162: error: cannot find symbol
  public void withScriptingClient(Consumer<ScriptingCommands> f) {
                                           ^
  symbol:   class ScriptingCommands
  location: class JedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/JedisClientDelegate.java:169: error: cannot find symbol
  public <R> R withScriptingClient(Function<ScriptingCommands, R> f) {
                                            ^
  symbol:   class ScriptingCommands
  location: class JedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:41: error: cannot find symbol
  <R> R withMultiClient(Function<MultiKeyCommands, R> f);
                                 ^
  symbol:   class MultiKeyCommands
  location: interface RedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:43: error: cannot find symbol
  void withMultiClient(Consumer<MultiKeyCommands> f);
                                ^
  symbol:   class MultiKeyCommands
  location: interface RedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:45: error: cannot find symbol
  <R> R withBinaryClient(Function<BinaryJedisCommands, R> f);
                                  ^
  symbol:   class BinaryJedisCommands
  location: interface RedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:47: error: cannot find symbol
  void withBinaryClient(Consumer<BinaryJedisCommands> f);
                                 ^
  symbol:   class BinaryJedisCommands
  location: interface RedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:49: error: cannot find symbol
  void withPipeline(Consumer<RedisPipeline> f);
                             ^
  symbol:   class RedisPipeline
  location: interface RedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:51: error: cannot find symbol
  <R> R withPipeline(Function<RedisPipeline, R> f);
                              ^
  symbol:   class RedisPipeline
  location: interface RedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:53: error: cannot find symbol
  void syncPipeline(RedisPipeline p);
                    ^
  symbol:   class RedisPipeline
  location: interface RedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:69: error: cannot find symbol
  void withScriptingClient(Consumer<ScriptingCommands> f);
                                    ^
  symbol:   class ScriptingCommands
  location: interface RedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/RedisClientDelegate.java:71: error: cannot find symbol
  <R> R withScriptingClient(Function<ScriptingCommands, R> f);
                                     ^
  symbol:   class ScriptingCommands
  location: interface RedisClientDelegate
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:107: error: cannot find symbol
  public void setClient(Client client) {
                        ^
  symbol:   class Client
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:386: error: cannot find symbol
  public Response<Long> sort(String key, SortingParams sortingParameters, String dstkey) {
                                         ^
  symbol:   class SortingParams
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:392: error: cannot find symbol
  public Response<Long> sort(byte[] key, SortingParams sortingParameters, byte[] dstkey) {
                                         ^
  symbol:   class SortingParams
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:458: error: cannot find symbol
  public Response<Long> zinterstore(String dstkey, ZParams params, String... sets) {
                                                   ^
  symbol:   class ZParams
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:464: error: cannot find symbol
  public Response<Long> zinterstore(byte[] dstkey, ZParams params, byte[]... sets) {
                                                   ^
  symbol:   class ZParams
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:482: error: cannot find symbol
  public Response<Long> zunionstore(String dstkey, ZParams params, String... sets) {
                                                   ^
  symbol:   class ZParams
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:488: error: cannot find symbol
  public Response<Long> zunionstore(byte[] dstkey, ZParams params, byte[]... sets) {
                                                   ^
  symbol:   class ZParams
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:626: error: cannot find symbol
  public Response<Long> bitop(BitOP op, byte[] destKey, byte[]... srcKeys) {
                              ^
  symbol:   class BitOP
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:632: error: cannot find symbol
  public Response<Long> bitop(BitOP op, String destKey, String... srcKeys) {
                              ^
  symbol:   class BitOP
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:916: error: cannot find symbol
  public Response<Long> bitpos(String key, boolean value, BitPosParams params) {
                                                          ^
  symbol:   class BitPosParams
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:928: error: cannot find symbol
  public Response<Long> bitpos(byte[] key, boolean value, BitPosParams params) {
                                                          ^
  symbol:   class BitPosParams
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1414: error: cannot find symbol
  public Response<List<String>> sort(String key, SortingParams sortingParameters) {
                                                 ^
  symbol:   class SortingParams
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1420: error: cannot find symbol
  public Response<List<byte[]>> sort(byte[] key, SortingParams sortingParameters) {
                                                 ^
  symbol:   class SortingParams
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1708: error: cannot find symbol
  public Response<Set<Tuple>> zrangeByScoreWithScores(String key, double min, double max) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1714: error: cannot find symbol
  public Response<Set<Tuple>> zrangeByScoreWithScores(String key, String min, String max) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1720: error: cannot find symbol
  public Response<Set<Tuple>> zrangeByScoreWithScores(byte[] key, double min, double max) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1726: error: cannot find symbol
  public Response<Set<Tuple>> zrangeByScoreWithScores(byte[] key, byte[] min, byte[] max) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1732: error: cannot find symbol
  public Response<Set<Tuple>> zrangeByScoreWithScores(
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1740: error: cannot find symbol
  public Response<Set<Tuple>> zrangeByScoreWithScores(
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1748: error: cannot find symbol
  public Response<Set<Tuple>> zrangeByScoreWithScores(
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1756: error: cannot find symbol
  public Response<Set<Tuple>> zrangeByScoreWithScores(
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1816: error: cannot find symbol
  public Response<Set<Tuple>> zrevrangeByScoreWithScores(String key, double max, double min) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1822: error: cannot find symbol
  public Response<Set<Tuple>> zrevrangeByScoreWithScores(String key, String max, String min) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1828: error: cannot find symbol
  public Response<Set<Tuple>> zrevrangeByScoreWithScores(byte[] key, double max, double min) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1834: error: cannot find symbol
  public Response<Set<Tuple>> zrevrangeByScoreWithScores(byte[] key, byte[] max, byte[] min) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1840: error: cannot find symbol
  public Response<Set<Tuple>> zrevrangeByScoreWithScores(
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1848: error: cannot find symbol
  public Response<Set<Tuple>> zrevrangeByScoreWithScores(
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1856: error: cannot find symbol
  public Response<Set<Tuple>> zrevrangeByScoreWithScores(
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1864: error: cannot find symbol
  public Response<Set<Tuple>> zrevrangeByScoreWithScores(
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1872: error: cannot find symbol
  public Response<Set<Tuple>> zrangeWithScores(String key, long start, long end) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1878: error: cannot find symbol
  public Response<Set<Tuple>> zrangeWithScores(byte[] key, long start, long end) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1956: error: cannot find symbol
  public Response<Set<Tuple>> zrevrangeWithScores(String key, long start, long end) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:1962: error: cannot find symbol
  public Response<Set<Tuple>> zrevrangeWithScores(byte[] key, long start, long end) {
                      ^
  symbol:   class Tuple
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2346: error: cannot find symbol
  public Response<Double> geodist(byte[] key, byte[] member1, byte[] member2, GeoUnit unit) {
                                                                              ^
  symbol:   class GeoUnit
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2358: error: cannot find symbol
  public Response<Double> geodist(String key, String member1, String member2, GeoUnit unit) {
                                                                              ^
  symbol:   class GeoUnit
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2389: error: cannot find symbol
      byte[] key, double longitude, double latitude, double radius, GeoUnit unit) {
                                                                    ^
  symbol:   class GeoUnit
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2388: error: cannot find symbol
  public Response<List<GeoRadiusResponse>> georadius(
                       ^
  symbol:   class GeoRadiusResponse
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2400: error: cannot find symbol
      GeoUnit unit,
      ^
  symbol:   class GeoUnit
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2395: error: cannot find symbol
  public Response<List<GeoRadiusResponse>> georadius(
                       ^
  symbol:   class GeoRadiusResponse
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2409: error: cannot find symbol
      String key, double longitude, double latitude, double radius, GeoUnit unit) {
                                                                    ^
  symbol:   class GeoUnit
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2408: error: cannot find symbol
  public Response<List<GeoRadiusResponse>> georadius(
                       ^
  symbol:   class GeoRadiusResponse
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2420: error: cannot find symbol
      GeoUnit unit,
      ^
  symbol:   class GeoUnit
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2415: error: cannot find symbol
  public Response<List<GeoRadiusResponse>> georadius(
                       ^
  symbol:   class GeoRadiusResponse
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2429: error: cannot find symbol
      byte[] key, byte[] member, double radius, GeoUnit unit) {
                                                ^
  symbol:   class GeoUnit
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2428: error: cannot find symbol
  public Response<List<GeoRadiusResponse>> georadiusByMember(
                       ^
  symbol:   class GeoRadiusResponse
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2436: error: cannot find symbol
      byte[] key, byte[] member, double radius, GeoUnit unit, GeoRadiusParam param) {
                                                ^
  symbol:   class GeoUnit
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2435: error: cannot find symbol
  public Response<List<GeoRadiusResponse>> georadiusByMember(
                       ^
  symbol:   class GeoRadiusResponse
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2444: error: cannot find symbol
      String key, String member, double radius, GeoUnit unit) {
                                                ^
  symbol:   class GeoUnit
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2443: error: cannot find symbol
  public Response<List<GeoRadiusResponse>> georadiusByMember(
                       ^
  symbol:   class GeoRadiusResponse
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2451: error: cannot find symbol
      String key, String member, double radius, GeoUnit unit, GeoRadiusParam param) {
                                                ^
  symbol:   class GeoUnit
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedPipeline.java:2450: error: cannot find symbol
  public Response<List<GeoRadiusResponse>> georadiusByMember(
                       ^
  symbol:   class GeoRadiusResponse
  location: class InstrumentedPipeline
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:33: error: cannot find symbol
import redis.clients.jedis.util.Slowlog;
                               ^
  symbol:   class Slowlog
  location: package redis.clients.jedis.util
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:599: error: cannot find symbol
  public Set<Tuple> zrangeWithScores(String key, long start, long end) {
             ^
  symbol:   class Tuple
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:605: error: cannot find symbol
  public Set<Tuple> zrevrangeWithScores(String key, long start, long end) {
             ^
  symbol:   class Tuple
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:635: error: cannot find symbol
  public List<String> sort(String key, SortingParams sortingParameters) {
                                       ^
  symbol:   class SortingParams
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:659: error: cannot find symbol
  public Long sort(String key, SortingParams sortingParameters, String dstkey) {
                               ^
  symbol:   class SortingParams
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:713: error: cannot find symbol
  public Set<Tuple> zrangeByScoreWithScores(String key, double min, double max) {
             ^
  symbol:   class Tuple
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:719: error: cannot find symbol
  public Set<Tuple> zrangeByScoreWithScores(String key, String min, String max) {
             ^
  symbol:   class Tuple
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:725: error: cannot find symbol
  public Set<Tuple> zrangeByScoreWithScores(
             ^
  symbol:   class Tuple
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:733: error: cannot find symbol
  public Set<Tuple> zrangeByScoreWithScores(
             ^
  symbol:   class Tuple
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:759: error: cannot find symbol
  public Set<Tuple> zrevrangeByScoreWithScores(String key, double max, double min) {
             ^
  symbol:   class Tuple
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:765: error: cannot find symbol
  public Set<Tuple> zrevrangeByScoreWithScores(
             ^
  symbol:   class Tuple
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:773: error: cannot find symbol
  public Set<Tuple> zrevrangeByScoreWithScores(
             ^
  symbol:   class Tuple
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:787: error: cannot find symbol
  public Set<Tuple> zrevrangeByScoreWithScores(String key, String max, String min) {
             ^
  symbol:   class Tuple
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:817: error: cannot find symbol
  public Long zunionstore(String dstkey, ZParams params, String... sets) {
                                         ^
  symbol:   class ZParams
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:829: error: cannot find symbol
  public Long zinterstore(String dstkey, ZParams params, String... sets) {
                                         ^
  symbol:   class ZParams
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:902: error: cannot find symbol
      final String key, final ListPosition where, final String pivot, final String value) {
                              ^
  symbol:   class ListPosition
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:951: error: cannot find symbol
  public Long bitpos(String key, boolean value, BitPosParams params) {
                                                ^
  symbol:   class BitPosParams
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:1044: error: cannot find symbol
  public List<Slowlog> slowlogGet() {
              ^
  symbol:   class Slowlog
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:1050: error: cannot find symbol
  public List<Slowlog> slowlogGet(long entries) {
              ^
  symbol:   class Slowlog
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:1086: error: cannot find symbol
  public Long bitop(BitOP op, String destKey, String... srcKeys) {
                    ^
  symbol:   class BitOP
  location: class InstrumentedJedis
/kork/kork-jedis/src/main/java/com/netflix/spinnaker/kork/jedis/telemetry/InstrumentedJedis.java:1195: error: cannot find symbol
  public ScanResult<String> scan(String cursor) {
         ^
  symbol:   class ScanResult
  location: class InstrumentedJedis
100 errors
only showing the first 100 errors, of 166 total; use -Xmaxerrs if you would like to see more
```
The root cause of these errors is upgrade of `redis.clients:jedis` from 3.8.0 to 4.3.2 with spring boot upgrade from 2.x to 3.x.
In order to fix these issues, migrated jedis from 3.x to 4.x by following the migration [document](https://github.com/redis/jedis/blob/master/docs/3to4.md)
And for further changelogs, please refer [here](https://github.com/redis/jedis/releases/tag/v4.0.0)

Removed the reflection logic to check the `internalPool` field from `JedisPool` object, as `internalPool` field has been removed from Jedis [4.3.2](https://javadoc.io/static/redis.clients/jedis/4.3.2/redis/clients/jedis/util/Pool.html#internalPool) and `JedisPool` is sub class of `GenericObjectPool` from Jedis [4.0.0](redis/jedis#2521) onwards. So, refactoring the logic to check null value.

In Jedis 4.x, default constructor of `Pipeline` class has be removed in lieu of parameterised constructor to obtain `Connection` object either directly passing `Connection` or `Jedis`, as discussed [here](redis/jedis#2693). So, updating the constructor by replacing the `Pipeline` with `Jedis`, and updated its usage in `InstrumentedJedis.pipelined()` method.
  • Loading branch information
j-sandy committed Dec 10, 2024
1 parent 2fef420 commit afd305a
Show file tree
Hide file tree
Showing 6 changed files with 351 additions and 706 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,11 @@
import java.util.function.Function;
import redis.clients.jedis.Jedis;
import redis.clients.jedis.Pipeline;
import redis.clients.jedis.ScanParams;
import redis.clients.jedis.ScanResult;
import redis.clients.jedis.Transaction;
import redis.clients.jedis.commands.BinaryJedisCommands;
import redis.clients.jedis.commands.JedisBinaryCommands;
import redis.clients.jedis.commands.JedisCommands;
import redis.clients.jedis.commands.MultiKeyCommands;
import redis.clients.jedis.commands.RedisPipeline;
import redis.clients.jedis.commands.ScriptingCommands;
import redis.clients.jedis.params.ScanParams;
import redis.clients.jedis.resps.ScanResult;
import redis.clients.jedis.util.Pool;

public class JedisClientDelegate implements RedisClientDelegate {
Expand Down Expand Up @@ -64,49 +61,49 @@ public void withCommandsClient(Consumer<JedisCommands> f) {
}

@Override
public <R> R withMultiClient(Function<MultiKeyCommands, R> f) {
public <R> R withMultiClient(Function<JedisCommands, R> f) {
try (Jedis jedis = jedisPool.getResource()) {
return f.apply(jedis);
}
}

@Override
public void withMultiClient(Consumer<MultiKeyCommands> f) {
public void withMultiClient(Consumer<JedisCommands> f) {
try (Jedis jedis = jedisPool.getResource()) {
f.accept(jedis);
}
}

@Override
public <R> R withBinaryClient(Function<BinaryJedisCommands, R> f) {
public <R> R withBinaryClient(Function<JedisBinaryCommands, R> f) {
try (Jedis jedis = jedisPool.getResource()) {
return f.apply(jedis);
}
}

@Override
public void withBinaryClient(Consumer<BinaryJedisCommands> f) {
public void withBinaryClient(Consumer<JedisBinaryCommands> f) {
try (Jedis jedis = jedisPool.getResource()) {
f.accept(jedis);
}
}

@Override
public void withPipeline(Consumer<RedisPipeline> f) {
public void withPipeline(Consumer<Pipeline> f) {
try (Jedis jedis = jedisPool.getResource()) {
f.accept(jedis.pipelined());
}
}

@Override
public <R> R withPipeline(Function<RedisPipeline, R> f) {
public <R> R withPipeline(Function<Pipeline, R> f) {
try (Jedis jedis = jedisPool.getResource()) {
return f.apply(jedis.pipelined());
}
}

@Override
public void syncPipeline(RedisPipeline p) {
public void syncPipeline(Pipeline p) {
if (!(p instanceof Pipeline)) {
throw new IllegalArgumentException(
"Invalid RedisPipeline implementation: " + p.getClass().getName());
Expand Down Expand Up @@ -159,14 +156,14 @@ public boolean supportsScripting() {
}

@Override
public void withScriptingClient(Consumer<ScriptingCommands> f) {
public void withScriptingClient(Consumer<JedisCommands> f) {
try (Jedis jedis = jedisPool.getResource()) {
f.accept(jedis);
}
}

@Override
public <R> R withScriptingClient(Function<ScriptingCommands, R> f) {
public <R> R withScriptingClient(Function<JedisCommands, R> f) {
try (Jedis jedis = jedisPool.getResource()) {
return f.apply(jedis);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@
import java.util.function.Function;
import redis.clients.jedis.Pipeline;
import redis.clients.jedis.Transaction;
import redis.clients.jedis.commands.BinaryJedisCommands;
import redis.clients.jedis.commands.JedisBinaryCommands;
import redis.clients.jedis.commands.JedisCommands;
import redis.clients.jedis.commands.MultiKeyCommands;
import redis.clients.jedis.commands.RedisPipeline;
import redis.clients.jedis.commands.ScriptingCommands;

/**
* Offers a functional interface over either a vanilla Jedis or Dynomite client.
Expand All @@ -38,19 +35,19 @@ public interface RedisClientDelegate {

void withCommandsClient(Consumer<JedisCommands> f);

<R> R withMultiClient(Function<MultiKeyCommands, R> f);
<R> R withMultiClient(Function<JedisCommands, R> f);

void withMultiClient(Consumer<MultiKeyCommands> f);
void withMultiClient(Consumer<JedisCommands> f);

<R> R withBinaryClient(Function<BinaryJedisCommands, R> f);
<R> R withBinaryClient(Function<JedisBinaryCommands, R> f);

void withBinaryClient(Consumer<BinaryJedisCommands> f);
void withBinaryClient(Consumer<JedisBinaryCommands> f);

void withPipeline(Consumer<RedisPipeline> f);
void withPipeline(Consumer<Pipeline> f);

<R> R withPipeline(Function<RedisPipeline, R> f);
<R> R withPipeline(Function<Pipeline, R> f);

void syncPipeline(RedisPipeline p);
void syncPipeline(Pipeline p);

boolean supportsMultiKeyPipelines();

Expand All @@ -66,9 +63,9 @@ public interface RedisClientDelegate {

boolean supportsScripting();

void withScriptingClient(Consumer<ScriptingCommands> f);
void withScriptingClient(Consumer<JedisCommands> f);

<R> R withScriptingClient(Function<ScriptingCommands, R> f);
<R> R withScriptingClient(Function<JedisCommands, R> f);

void withKeyScan(String pattern, int count, Consumer<RedisScanResult> f);
}
Loading

0 comments on commit afd305a

Please sign in to comment.