Skip to content

Commit 15b8036

Browse files
Bump org.redisson:redisson from 3.17.3 to 3.30.0 (apache#4924)
* Bump org.redisson:redisson from 3.17.3 to 3.30.0 Bumps [org.redisson:redisson](https://github.com/redisson/redisson) from 3.17.3 to 3.30.0. - [Release notes](https://github.com/redisson/redisson/releases) - [Changelog](https://github.com/redisson/redisson/blob/master/CHANGELOG.md) - [Commits](redisson/redisson@redisson-3.17.3...redisson-3.30.0) --- updated-dependencies: - dependency-name: org.redisson:redisson dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com> * manual upgrade * Update dependency that are no longer maintained * Streamline build command * Fix address in use and try to fix countDownLatch await blocking * Update deprecated ENV --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Pil0tXia <xiatian@apache.org>
1 parent f4f0d04 commit 15b8036

File tree

10 files changed

+38
-53
lines changed

10 files changed

+38
-53
lines changed

.github/workflows/ci.yml

+6-4
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
- name: GenerateGrammarSource
6060
run: ./gradlew clean generateGrammarSource --parallel --daemon --scan
6161
env:
62-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
62+
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
6363

6464
- name: Set up JDK ${{ matrix.java }}
6565
uses: actions/setup-java@v4
@@ -69,14 +69,16 @@ jobs:
6969

7070
# https://docs.gradle.org/current/userguide/performance.html
7171
- name: Build
72-
run: ./gradlew clean build dist jacocoTestReport -x spotlessJava -x generateGrammarSource --parallel --daemon --scan
72+
run: >
73+
./gradlew clean build dist jacocoTestReport --parallel --daemon --scan
74+
-x spotlessJava -x generateGrammarSource -x generateDistLicense -x checkDeniedLicense
7375
env:
74-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
76+
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
7577

7678
- name: Install plugin
7779
run: ./gradlew installPlugin --scan
7880
env:
79-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
81+
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
8082

8183
- name: Upload coverage report to codecov.io
8284
run: bash <(curl -s https://codecov.io/bash) || echo 'Failed to upload coverage report!'

.github/workflows/code-scanning.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ jobs:
6868
if: matrix.language == 'java'
6969
run: ./gradlew clean assemble compileTestJava --parallel --daemon --scan
7070
env:
71-
GRADLE_ENTERPRISE_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
71+
DEVELOCITY_ACCESS_KEY: ${{ secrets.GE_ACCESS_TOKEN }}
7272

7373
- name: Perform CodeQL analysis
7474
uses: github/codeql-action/analyze@v3

eventmesh-connectors/eventmesh-connector-redis/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies {
1919
implementation project(":eventmesh-common")
2020
implementation project(":eventmesh-openconnect:eventmesh-openconnect-java")
2121

22-
implementation 'org.redisson:redisson:3.17.3'
22+
implementation 'org.redisson:redisson:3.30.0'
2323

2424
api 'io.cloudevents:cloudevents-json-jackson'
2525

eventmesh-storage-plugin/eventmesh-storage-redis/build.gradle

+3-11
Original file line numberDiff line numberDiff line change
@@ -20,24 +20,16 @@ dependencies {
2020
implementation project(":eventmesh-storage-plugin:eventmesh-storage-api")
2121

2222
// redisson
23-
implementation('org.redisson:redisson:3.17.3') {
24-
exclude group: 'io.netty', module: 'netty-common'
25-
exclude group: 'io.netty', module: 'netty-buffer'
26-
exclude group: 'io.netty', module: 'netty-codec'
27-
exclude group: 'io.netty', module: 'netty-transport'
28-
exclude group: 'io.netty', module: 'netty-resolver'
29-
exclude group: 'io.netty', module: 'netty-resolver-dns'
30-
exclude group: 'io.netty', module: 'netty-handler'
31-
}
23+
implementation 'org.redisson:redisson:3.30.0'
3224

3325
// netty
34-
implementation "io.netty:netty-all"
26+
implementation 'io.netty:netty-all'
3527

3628
// auxiliary serialize
3729
api 'io.cloudevents:cloudevents-json-jackson'
3830

3931
// test dependencies
40-
testImplementation 'ai.grakn:redis-mock:0.1.6'
32+
testImplementation 'com.github.fppt:jedis-mock:1.1.1'
4133
testImplementation "org.mockito:mockito-core"
4234

4335
compileOnly 'org.projectlombok:lombok'

eventmesh-storage-plugin/eventmesh-storage-redis/gradle.properties

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
#
12
# Licensed to the Apache Software Foundation (ASF) under one or more
23
# contributor license agreements. See the NOTICE file distributed with
34
# this work for additional information regarding copyright ownership.

eventmesh-storage-plugin/eventmesh-storage-redis/src/main/java/org/apache/eventmesh/storage/redis/client/RedissonClient.java

+5-8
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,15 @@ private static Redisson create(RedisProperties properties) {
7373
throw new StorageRuntimeException(message, ie);
7474
}
7575

76+
Config config = new Config();
77+
config.setCodec(CloudEventCodec.getInstance());
78+
config.setThreads(properties.getRedissonThreads());
79+
config.setNettyThreads(properties.getRedissonNettyThreads());
80+
7681
String serverAddress = properties.getServerAddress();
7782
String serverPassword = properties.getServerPassword();
7883
String masterName = properties.getServerMasterName();
7984

80-
Config config = OBJECT_MAPPER.convertValue(properties.getRedissonProperties(), Config.class);
81-
82-
if (config == null) {
83-
config = new Config();
84-
}
85-
86-
config.setCodec(CloudEventCodec.getInstance());
87-
8885
switch (serverType) {
8986
case SINGLE:
9087
config.useSingleServer()

eventmesh-storage-plugin/eventmesh-storage-redis/src/main/java/org/apache/eventmesh/storage/redis/config/RedisProperties.java

+6-5
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@
2020
import org.apache.eventmesh.common.config.Config;
2121
import org.apache.eventmesh.common.config.ConfigField;
2222

23-
import java.util.Properties;
24-
2523
import lombok.Data;
2624

2725
@Data
@@ -44,7 +42,7 @@ public class RedisProperties {
4442
* The address of the redis server following format -- host1:port1,host2:port2,……
4543
*/
4644
@ConfigField(field = "serverAddress")
47-
private String serverAddress;
45+
private String serverAddress = "redis://127.0.0.1:6379";
4846

4947
/**
5048
* The password for redis authentication.
@@ -55,8 +53,11 @@ public class RedisProperties {
5553
/**
5654
* The redisson options, redisson properties prefix is `eventMesh.server.redis.redisson`
5755
*/
58-
@ConfigField(field = "redisson")
59-
private Properties redissonProperties;
56+
@ConfigField(field = "redisson.threads")
57+
private int redissonThreads = 16;
58+
59+
@ConfigField(field = "redisson.nettyThreads")
60+
private int redissonNettyThreads = 32;
6061

6162
public enum ServerType {
6263
SINGLE,

eventmesh-storage-plugin/eventmesh-storage-redis/src/main/resources/redis-client.properties

+5-1
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,9 @@
1515
# limitations under the License.
1616
#
1717

18-
eventMesh.server.redis.serverAddress=
18+
eventMesh.server.redis.serverAddress=redis://127.0.0.1:6379
1919
eventMesh.server.redis.serverPassword=
20+
eventMesh.server.redis.serverType=SINGLE
21+
eventMesh.server.redis.serverMasterName=master
22+
eventMesh.server.redis.redisson.threads=
23+
eventMesh.server.redis.redisson.nettyThreads=

eventmesh-storage-plugin/eventmesh-storage-redis/src/test/java/org/apache/eventmesh/storage/redis/AbstractRedisServer.java

+8-14
Original file line numberDiff line numberDiff line change
@@ -17,25 +17,19 @@
1717

1818
package org.apache.eventmesh.storage.redis;
1919

20-
import org.junit.jupiter.api.AfterAll;
21-
import org.junit.jupiter.api.BeforeAll;
20+
import java.io.IOException;
2221

23-
import ai.grakn.redismock.RedisServer;
22+
import com.github.fppt.jedismock.RedisServer;
2423

2524
public abstract class AbstractRedisServer {
2625

27-
private static RedisServer redisServer;
26+
private static final RedisServer redisServer;
2827

29-
@BeforeAll
30-
public static void setupRedisServer() throws Exception {
31-
redisServer = RedisServer.newRedisServer(6379);
32-
redisServer.start();
33-
}
34-
35-
@AfterAll
36-
public static void shutdownRedisServer() {
37-
if (redisServer != null) {
38-
redisServer.stop();
28+
static {
29+
try {
30+
redisServer = RedisServer.newRedisServer(6379).start();
31+
} catch (IOException e) {
32+
throw new RuntimeException(e);
3933
}
4034
}
4135
}

eventmesh-storage-plugin/eventmesh-storage-redis/src/test/java/org/apache/eventmesh/storage/redis/config/RedisPropertiesTest.java

+2-8
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@
1919

2020
import org.apache.eventmesh.common.config.ConfigService;
2121

22-
import java.util.Properties;
23-
2422
import org.junit.jupiter.api.Assertions;
2523
import org.junit.jupiter.api.Test;
2624

@@ -37,11 +35,7 @@ private void assertConfig(RedisProperties config) {
3735
Assertions.assertEquals("redis://127.0.0.1:6379", config.getServerAddress());
3836
Assertions.assertEquals(RedisProperties.ServerType.SINGLE, config.getServerType());
3937
Assertions.assertEquals("serverMasterName-success!!!", config.getServerMasterName());
40-
41-
Properties properties = new Properties();
42-
properties.put("threads", "2");
43-
properties.put("nettyThreads", "2");
44-
Properties redissonProperties = config.getRedissonProperties();
45-
Assertions.assertEquals(properties, redissonProperties);
38+
Assertions.assertEquals(2, config.getRedissonThreads());
39+
Assertions.assertEquals(2, config.getRedissonNettyThreads());
4640
}
4741
}

0 commit comments

Comments
 (0)