Skip to content

Commit f85d437

Browse files
committed
Use lettuce-core 7.0.0-SNAPSHOT
- feature branch now merged into lettuce-core use lettuce-core snapshot version
1 parent 1a9a05a commit f85d437

File tree

7 files changed

+53
-101
lines changed

7 files changed

+53
-101
lines changed

.github/workflows/integration.yaml

Lines changed: 6 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,8 @@ jobs:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Checkout lettuce-test-app repository
14+
- name: Checkout repository
1515
uses: actions/checkout@v4
16-
with:
17-
path: lettuce-test-app
18-
19-
- name: Checkout lettuce-core custom branch
20-
uses: actions/checkout@v4
21-
with:
22-
repository: redis/lettuce
23-
ref: feature/maintenance-events
24-
path: lettuce-core
2516

2617
- name: Set up JDK 17
2718
uses: actions/setup-java@v3
@@ -30,32 +21,15 @@ jobs:
3021
java-version: '17'
3122
cache: 'maven'
3223

33-
- name: Build and install custom lettuce-core
34-
working-directory: lettuce-core
35-
run: |
36-
echo "Building REQUIRED custom lettuce-core from feature/maintenance-events branch"
37-
mvn versions:set -DnewVersion=7.0.0.MAINT-SNAPSHOT
38-
mvn -B clean install -DskipTests
39-
echo "Custom lettuce-core 7.0.0.MAINT-SNAPSHOT installed to local repository"
40-
41-
- name: Verify lettuce-core installation
42-
working-directory: lettuce-core
43-
run: |
44-
echo "Verifying lettuce-core installation:"
45-
ls -la ~/.m2/repository/io/lettuce/lettuce-core/7.0.0.MAINT-SNAPSHOT/
46-
4724
- name: Check code formatting
48-
working-directory: lettuce-test-app
4925
run: mvn formatter:validate
5026

51-
- name: Build and verify lettuce-test-app with REQUIRED custom lettuce-core
52-
working-directory: lettuce-test-app
27+
- name: Build and verify lettuce-test-app
5328
run: |
54-
echo "Building lettuce-test-app with REQUIRED custom lettuce-core version 7.0.0.MAINT-SNAPSHOT"
55-
mvn -B clean verify -Dlettuce.version=7.0.0.MAINT-SNAPSHOT
29+
echo "Building lettuce-test-app with lettuce-core snapshot version"
30+
mvn -B clean verify
5631
5732
- name: Run integration tests
58-
working-directory: lettuce-test-app
5933
run: |
60-
echo "Running integration tests with REQUIRED custom lettuce-core"
61-
mvn test -Dlettuce.version=7.0.0.MAINT-SNAPSHOT
34+
echo "Running integration tests"
35+
mvn test

README.md

Lines changed: 25 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,27 +2,40 @@
22

33
A workload runner for testing Lettuce client fault tolerance against Redis database upgrades.
44

5-
> **⚠️ IMPORTANT**: This project requires a custom build of lettuce-core from the `feature/maintenance-events` branch. Use `./scripts/build.sh` to build the project correctly.
5+
> **ℹ️ NOTE**: This project uses lettuce-core 7.0.0-SNAPSHOT which includes the maintenance events features. The snapshot version is automatically downloaded from Maven repositories.
66
77
## Build
88

9-
> **⚠️ IMPORTANT**: This project REQUIRES a custom build of lettuce-core from the `feature/maintenance-events` branch to function properly. The standard lettuce-core release will not work.
10-
119
### Building the Project
1210

13-
Use the provided build script to automatically build and install the required custom lettuce-core version:
11+
Use the provided build script to build and test the project:
1412

1513
```sh
1614
./scripts/build.sh
1715
```
1816

1917
The build script will:
20-
1. Clone the lettuce-core repository from the `feature/maintenance-events` branch
21-
2. Build and install the custom lettuce-core version (7.0.0.MAINT-SNAPSHOT) to your local Maven repository
22-
3. Build and test the lettuce-test-app using the custom lettuce-core version
18+
1. Check code formatting
19+
2. Build the lettuce-test-app using the lettuce-core version specified in pom.xml
20+
3. Run tests to verify everything works correctly
21+
22+
### Manual Build
23+
24+
You can also build manually using Maven:
25+
26+
```sh
27+
# Check formatting
28+
mvn formatter:validate
29+
30+
# Build and test
31+
mvn clean verify
32+
33+
# Run tests
34+
mvn test
35+
```
2336

2437
### CI/CD Integration
25-
The GitHub Actions workflow automatically builds with the custom lettuce-core version from the `feature/maintenance-events` branch. See `.github/workflows/integration.yaml` for details.
38+
The GitHub Actions workflow automatically builds and tests the project. See `.github/workflows/integration.yaml` for details.
2639
## Usage
2740
Basic usage with specified runner configuration file and custom log directory:
2841
```sh
@@ -166,16 +179,16 @@ Example query for visualising throughput per second of get on 10s window
166179
| `redis.operations.total` | Counter | Counts the number of total Redis command API calls completed successfully or with an error. | `command`: Redis command (e.g., `GET`, `SET`), status: (SUCCESS, ERROR) |
167180

168181
### Lettuce App Custom Metrics
169-
This project uses a modified version of lettuce-core with additional metrics from the `feature/maintenance-events` branch.
182+
This project uses lettuce-core 7.0.0-SNAPSHOT which includes additional metrics from the maintenance events features that were merged into the main branch.
170183

171-
**Building with Custom Lettuce-Core:**
172-
The build script automatically handles building and using the required custom lettuce-core version:
184+
**Building the Project:**
185+
Use the build script to build and test the project:
173186

174187
```shell
175188
./scripts/build.sh
176189
```
177190

178-
This is the only supported way to build the project, as it requires the custom lettuce-core implementation.
191+
The lettuce-core snapshot version with maintenance events features is automatically downloaded from Maven repositories.
179192

180193
Additional metrics aer enabled/disabled via configuration property in the `runner-config.yaml` file:
181194
```yaml

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<properties>
1818
<java.version>17</java.version>
1919
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
20-
<lettuce.version>7.0.0.MAINT-SNAPSHOT</lettuce.version>
20+
<lettuce.version>7.0.0-SNAPSHOT</lettuce.version>
2121
</properties>
2222

2323
<repositories>

runner-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ runner:
3939
commandLatencyMonitoring: true # Enables Lettuce internal command latency monitoring
4040
connectionMonitoring: true # Enables Additional metrics for connection inactive time. Note supported with GA build of lettuce, and required custom Lettuce client build. See README.md for instruction ho to enable them
4141
autoReconnect: true
42-
maintenanceEventsConfig:
43-
enabled: true
42+
#maintenanceEventsConfig:
43+
# enabled: true
4444
# movingEndpointAddressType: EXTERNAL_IP # INTERNAL_IP, INTERNAL_FQDN, EXTERNAL_IP, EXTERNAL_FQDN
4545
#reconnectOptions:
4646
# fixedDelay: PT1S # 1s Configures constant delay between re-connection attempts

scripts/build.sh

Lines changed: 16 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,74 +1,41 @@
11
#!/bin/bash
22

3-
# Script to build lettuce-test-app with REQUIRED custom lettuce-core from feature/maintenance-events branch
4-
# This project REQUIRES the custom lettuce-core build to function properly
3+
# Script to build lettuce-test-app with lettuce-core snapshot version
4+
# Uses the publicly available lettuce-core version specified in pom.xml
55
# Usage: ./scripts/build.sh
66

77
set -e
88

99
# Configuration
10-
LETTUCE_REPO="https://github.com/redis/lettuce.git"
11-
LETTUCE_BRANCH="feature/maintenance-events"
12-
LETTUCE_VERSION="7.0.0.MAINT-SNAPSHOT"
13-
TEMP_DIR="$(mktemp -d)"
1410
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
1511
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
1612

13+
# Get lettuce version from pom.xml
14+
LETTUCE_VERSION=$(mvn -f "$PROJECT_ROOT/pom.xml" help:evaluate -Dexpression=lettuce.version -q -DforceStdout 2>/dev/null)
15+
1716
echo "=========================================="
18-
echo "Building lettuce-test-app with REQUIRED custom lettuce-core"
17+
echo "Building lettuce-test-app with lettuce-core"
1918
echo "=========================================="
20-
echo "Lettuce repository: $LETTUCE_REPO"
21-
echo "Lettuce branch: $LETTUCE_BRANCH"
22-
echo "Lettuce version: $LETTUCE_VERSION"
23-
echo "Temp directory: $TEMP_DIR"
19+
echo "Lettuce version: $LETTUCE_VERSION (from pom.xml)"
2420
echo "Project root: $PROJECT_ROOT"
2521
echo "=========================================="
2622

27-
# Function to cleanup temp directory
28-
cleanup() {
29-
echo "Cleaning up temporary directory: $TEMP_DIR"
30-
rm -rf "$TEMP_DIR"
31-
}
32-
trap cleanup EXIT
33-
34-
# Step 1: Clone lettuce-core repository
35-
echo "Step 1: Cloning lettuce-core repository..."
36-
cd "$TEMP_DIR"
37-
git clone --branch "$LETTUCE_BRANCH" --depth 1 "$LETTUCE_REPO" lettuce-core
38-
cd lettuce-core
39-
40-
# Step 2: Build and install custom lettuce-core
41-
echo "Step 2: Building and installing custom lettuce-core..."
42-
echo "Setting version to $LETTUCE_VERSION"
43-
mvn versions:set -DnewVersion="$LETTUCE_VERSION" -DgenerateBackupPoms=false
44-
45-
echo "Building and installing lettuce-core..."
46-
mvn clean install -DskipTests -B
47-
48-
echo "Verifying installation..."
49-
if [ -d "$HOME/.m2/repository/io/lettuce/lettuce-core/$LETTUCE_VERSION" ]; then
50-
echo "✅ Custom lettuce-core $LETTUCE_VERSION successfully installed"
51-
ls -la "$HOME/.m2/repository/io/lettuce/lettuce-core/$LETTUCE_VERSION/"
52-
else
53-
echo "❌ Failed to install custom lettuce-core"
54-
exit 1
55-
fi
56-
57-
# Step 3: Build lettuce-test-app with custom version
58-
echo "Step 3: Building lettuce-test-app with custom lettuce-core..."
23+
# Step 1: Check code formatting
24+
echo "Step 1: Checking code formatting..."
5925
cd "$PROJECT_ROOT"
60-
61-
echo "Checking code formatting..."
6226
mvn formatter:validate
6327

28+
# Step 2: Build lettuce-test-app
29+
echo "Step 2: Building lettuce-test-app..."
6430
echo "Building lettuce-test-app with lettuce.version=$LETTUCE_VERSION..."
65-
mvn clean verify -Dlettuce.version="$LETTUCE_VERSION" -B
31+
mvn clean verify -B
6632

67-
echo "Running tests..."
68-
mvn test -Dlettuce.version="$LETTUCE_VERSION"
33+
# Step 3: Run tests
34+
echo "Step 3: Running tests..."
35+
mvn test
6936

7037
echo "=========================================="
71-
echo "✅ Successfully built lettuce-test-app with custom lettuce-core $LETTUCE_VERSION"
38+
echo "✅ Successfully built lettuce-test-app with lettuce-core $LETTUCE_VERSION"
7239
echo "=========================================="
7340
echo ""
7441
echo "To run the application with the custom lettuce-core version:"

src/main/java/io/lettuce/test/workloads/cluster/RedisCommandsClusterAsyncWorkload.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,6 @@
22

33
import io.lettuce.core.LettuceFutures;
44
import io.lettuce.core.RedisFuture;
5-
import io.lettuce.core.api.StatefulRedisConnection;
6-
import io.lettuce.core.api.async.RedisAsyncCommands;
75
import io.lettuce.core.cluster.api.StatefulRedisClusterConnection;
86
import io.lettuce.core.cluster.api.async.RedisClusterAsyncCommands;
97
import io.lettuce.test.CommonWorkloadOptions;

src/main/resources/runner-config-defaults.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ runner:
3535

3636
clientOptions:
3737
#autoReconnect: true
38-
maintenanceEventsConfig:
39-
enabled: true
38+
#maintenanceEventsConfig:
39+
# enabled: true
4040
# movingEndpointAddressType: EXTERNAL_IP # INTERNAL_IP, INTERNAL_FQDN, EXTERNAL_IP, EXTERNAL_FQDN
4141
#reconnectOptions:
4242
# fixedDelay: PT1S # 1s Configures constant delay between re-connection attempts
@@ -47,7 +47,7 @@ runner:
4747
#disconnectedBehavior: REJECT_COMMANDS #Options: DEFAULT, ACCEPT_COMMANDS, REJECT_COMMANDS
4848
timeoutOptions: # Options to configure command timeouts
4949
fixedTimeout: PT0.200S # 200 ms
50-
timeoutsRelaxingDuringMaintenance: PT1S # 1 s
50+
# timeoutsRelaxingDuringMaintenance: PT1S # 1 s
5151
#socketOptions: # Options to configure low-level socket options for the connections kept to Redis servers.
5252
# connectTimeout: PT10S # 10 s
5353
# tcpUserTimeoutOptions:

0 commit comments

Comments
 (0)