Skip to content

Commit 1ce1746

Browse files
committed
Merge remote-tracking branch 'redis/master' into feature/automatic-failover-2
2 parents 8f2f195 + e838e48 commit 1ce1746

File tree

113 files changed

+660
-104
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

113 files changed

+660
-104
lines changed
Lines changed: 13 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,7 @@
1-
# For most projects, this workflow file will not need changing; you simply need
2-
# to commit it to your repository.
3-
#
4-
# You may wish to alter this file to override the set of languages analyzed,
5-
# or to provide custom queries or build logic.
6-
#
7-
# ******** NOTE ********
8-
# We have attempted to detect the languages in your repository. Please check
9-
# the `language` matrix defined below to confirm you have the correct set of
10-
# supported CodeQL languages.
11-
#
121
name: "CodeQL"
132

143
on:
4+
workflow_dispatch:
155
push:
166
branches: [ master ]
177
pull_request:
@@ -35,29 +25,21 @@ jobs:
3525

3626
# Initializes the CodeQL tools for scanning.
3727
- name: Initialize CodeQL
38-
uses: github/codeql-action/init@v2
28+
uses: github/codeql-action/init@v3
3929
with:
4030
languages: java
41-
# If you wish to specify custom queries, you can do so here or in a config file.
42-
# By default, queries listed here will override any specified in a config file.
43-
# Prefix the list here with "+" to use these queries and those in the config file.
44-
# queries: ./path/to/local/query, your-org/your-repo/queries@main
31+
dependency-caching: true
32+
build-mode: manual
4533

46-
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
47-
# If this step fails, then you should remove it and run the build manually (see below)
48-
- name: Autobuild
49-
uses: github/codeql-action/autobuild@v2
50-
51-
# ℹ️ Command-line programs to run using the OS shell.
52-
# 📚 https://git.io/JvXDl
53-
54-
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
55-
# and modify them (or add more) to build your code if your project
56-
# uses a compiled language
34+
- name: Set up JDK 8
35+
uses: actions/setup-java@v4
36+
with:
37+
distribution: temurin
38+
java-version: '8'
39+
cache: maven
5740

58-
#- run: |
59-
# make bootstrap
60-
# make release
41+
- name: Build
42+
run: mvn -B package
6143

6244
- name: Perform CodeQL Analysis
63-
uses: github/codeql-action/analyze@v2
45+
uses: github/codeql-action/analyze@v3

.github/workflows/doctests.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
doctests:
1313
runs-on: ubuntu-latest
1414
services:
15-
redis-stack:
16-
image: redis/redis-stack-server:latest
15+
redis:
16+
image: redis:latest
1717
options: >-
1818
--health-cmd "redis-cli ping" --health-interval 10s --health-timeout 5s --health-retries 5
1919
ports:
@@ -33,6 +33,9 @@ jobs:
3333
with:
3434
java-version: '11'
3535
distribution: 'temurin'
36+
- name: Maven offline
37+
run: |
38+
mvn -q dependency:go-offline
3639
- name: Run doctests
3740
run: |
38-
mvn -Pdoctests test
41+
mvn -Pdoctests clean compile test

.github/workflows/integration.yml

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -56,15 +56,3 @@ jobs:
5656
env:
5757
JVM_OPTS: -Xmx3200m
5858
TERM: dumb
59-
- name: Upload coverage to Codecov
60-
uses: codecov/codecov-action@v4
61-
with:
62-
fail_ci_if_error: false
63-
token: ${{ secrets.CODECOV_TOKEN }}
64-
- name: Upload test results to Codecov
65-
if: ${{ github.event_name == 'schedule' || (github.event_name == 'push') || github.event_name == 'workflow_dispatch'}}
66-
uses: codecov/test-results-action@v1
67-
with:
68-
fail_ci_if_error: false
69-
files: ./target/surefire-reports/TEST*
70-
token: ${{ secrets.CODECOV_TOKEN }}

.github/workflows/test-on-docker.yml

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,9 @@ jobs:
8080
export TEST_WORK_FOLDER=$REDIS_ENV_WORK_DIR
8181
echo $TEST_WORK_FOLDER
8282
if [ -z "$TESTS" ]; then
83-
mvn clean compile test
83+
mvn clean compile verify
8484
else
85-
mvn -Dtest=$TESTS clean compile test
85+
mvn -Dtest=$TESTS clean verify
8686
fi
8787
env:
8888
JVM_OPTS: "-XX:+HeapDumpOnOutOfMemoryError -XX:+ExitOnOutOfMemoryError -XX:HeapDumpPath=${{ runner.temp }}/heapdump-${{ matrix.redis_version }}.hprof"
@@ -105,6 +105,7 @@ jobs:
105105
with:
106106
files: |
107107
target/surefire-reports/**/*.xml
108+
target/failsafe-reports/**/*.xml
108109
# Collect logs on failure
109110
- name: Collect logs on failure
110111
if: failure() # This runs only if the previous steps failed
@@ -125,15 +126,22 @@ jobs:
125126
docker compose $COMPOSE_ENV_FILES -f src/test/resources/env/docker-compose.yml down
126127
continue-on-error: true
127128
# Upload code coverage
128-
- name: Upload coverage to Codecov
129+
- name: Upload merged coverage to Codecov
129130
uses: codecov/codecov-action@v5
130131
with:
132+
# Upload the merged JaCoCo XML report generated at verify phase
133+
files: ./target/site/jacoco/jacoco.xml
134+
flags: docker-${{ matrix.redis_version }}
135+
name: merged-coverage
131136
fail_ci_if_error: false
132137
token: ${{ secrets.CODECOV_TOKEN }}
133-
- name: Upload test results to Codecov
138+
- name: Upload test results to Codecov (unit + IT)
134139
if: ${{ github.event_name == 'schedule' || (github.event_name == 'push') || github.event_name == 'workflow_dispatch'}}
135140
uses: codecov/test-results-action@v1
136141
with:
137142
fail_ci_if_error: false
138-
files: ./target/surefire-reports/TEST*
143+
files: |
144+
./target/surefire-reports/*.xml
145+
./target/failsafe-reports/*.xml
146+
flags: test-results-docker-${{ matrix.redis_version }}
139147
token: ${{ secrets.CODECOV_TOKEN }}

Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,10 @@ stop:
522522
test: | start mvn-test-local stop
523523

524524
mvn-test-local:
525-
@TEST_ENV_PROVIDER=local mvn -Dtest=${TEST} clean compile test
525+
@TEST_ENV_PROVIDER=local mvn -Dtest=${TEST} clean verify
526526

527527
mvn-test:
528-
mvn -Dtest=${TEST} clean compile test
528+
mvn -Dtest=${TEST} clean verify
529529

530530
package: | start mvn-package stop
531531

README.md

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
# Jedis
22

33
[![Release](https://img.shields.io/github/release/redis/jedis.svg?sort=semver)](https://github.com/redis/jedis/releases/latest)
4-
[![Maven Central](https://img.shields.io/maven-central/v/redis.clients/jedis.svg)](https://search.maven.org/artifact/redis.clients/jedis)
4+
[![Maven Central](https://img.shields.io/maven-central/v/redis.clients/jedis.svg)](https://central.sonatype.com/artifact/redis.clients/jedis)
55
[![Javadocs](https://www.javadoc.io/badge/redis.clients/jedis.svg)](https://www.javadoc.io/doc/redis.clients/jedis)
6-
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](./LICENSE.txt)
7-
[![Integration](https://github.com/redis/jedis/actions/workflows/integration.yml/badge.svg?branch=master)](https://github.com/redis/jedis/actions/workflows/integration.yml)
6+
[![MIT licensed](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/redis/jedis/blob/master/LICENSE)
87
[![codecov](https://codecov.io/gh/redis/jedis/branch/master/graph/badge.svg?token=pAstxAAjYo)](https://codecov.io/gh/redis/jedis)
98
[![Discord](https://img.shields.io/discord/697882427875393627?style=flat-square)](https://discord.gg/redis)
109

@@ -29,13 +28,10 @@ Are you looking for a high-level library to handle object mapping? See [redis-om
2928
## Supported Redis versions
3029

3130
The most recent version of this library supports redis version
32-
[5.0](https://github.com/redis/redis/blob/5.0/00-RELEASENOTES),
33-
[6.0](https://github.com/redis/redis/blob/6.0/00-RELEASENOTES),
34-
[6.2](https://github.com/redis/redis/blob/6.2/00-RELEASENOTES),
35-
[7.0](https://github.com/redis/redis/blob/7.0/00-RELEASENOTES),
3631
[7.2](https://github.com/redis/redis/blob/7.2/00-RELEASENOTES),
37-
[7.4](https://github.com/redis/redis/blob/7.4/00-RELEASENOTES) and
38-
[8.0](https://github.com/redis/redis/blob/8.0/00-RELEASENOTES).
32+
[7.4](https://github.com/redis/redis/blob/7.4/00-RELEASENOTES),
33+
[8.0](https://github.com/redis/redis/blob/8.0/00-RELEASENOTES) and
34+
[8.2](https://github.com/redis/redis/blob/8.2/00-RELEASENOTES).
3935

4036
The table below highlights version compatibility of the most-recent library versions with Redis and JDK versions. Compatibility means communication features, and Redis command capabilities.
4137

@@ -47,6 +43,7 @@ The table below highlights version compatibility of the most-recent library vers
4743
| >= 5.0 | Version 6.0 to current | 8, 11, 17, 21 |
4844
| >= 5.2 | Version 7.2 to current | 8, 11, 17, 21 |
4945
| >= 6.0 | Version 7.2 to current | 8, 11, 17, 21 |
46+
| >= 7.0 | Version 7.2 to current | 8, 11, 17, 21 |
5047

5148
## Getting started
5249

@@ -56,16 +53,16 @@ To get started with Jedis, first add it as a dependency in your Java project. If
5653
<dependency>
5754
<groupId>redis.clients</groupId>
5855
<artifactId>jedis</artifactId>
59-
<version>6.0.0</version>
56+
<version>6.2.0</version>
6057
</dependency>
6158
```
6259

63-
To use the cutting-edge Jedis, check [here](/docs/jedis-maven.md).
60+
To use the cutting-edge Jedis, check [here](https://redis.github.io/jedis/jedis-maven/).
6461

65-
Next, you'll need to connect to Redis. Consider installing a redis-stack docker:
62+
Next, you'll need to connect to Redis. Consider installing a redis server with docker:
6663

6764
```bash
68-
docker run -p 6379:6379 -it redis/redis-stack:latest
65+
docker run -p 6379:6379 -it redis:latest
6966
```
7067

7168
For many applications, it's best to use a connection pool. You can instantiate a Jedis connection pool like so:
@@ -127,7 +124,7 @@ jedis.sadd("planets", "Mars");
127124
Jedis includes support for [Redis modules](https://redis.io/docs/modules/) such as
128125
[RedisJSON](https://redis.io/json/) and [RediSearch](https://redis.io/search/).
129126

130-
See the [RedisJSON Jedis](docs/redisjson.md) or [RediSearch Jedis](docs/redisearch.md) for details.
127+
See the [RedisJSON Jedis](https://redis.github.io/jedis/redisjson/) or [RediSearch Jedis](https://redis.github.io/jedis/redisearch/) for details.
131128

132129
## Failover
133130

@@ -136,24 +133,24 @@ Jedis supports retry and failover for your Redis deployments. This is useful whe
136133
1. You have more than one Redis deployment. This might include two independent Redis servers or two or more Redis databases replicated across multiple [active-active Redis Enterprise](https://redis.io/docs/latest/operate/rs/databases/active-active/) clusters.
137134
2. You want your application to connect to one deployment at a time and to fail over to the next available deployment if the first deployment becomes unavailable.
138135

139-
For the complete failover configuration options and examples, see the [Jedis failover docs](docs/failover.md).
136+
For the complete failover configuration options and examples, see the [Jedis failover docs](https://redis.github.io/jedis/failover/).
140137

141138
## Token-Based Authentication
142139

143140
Jedis supports Token-Based authentication (TBA) starting with 5.3.0 GA release. This feature is complemented by an extension library that enhances the developer experience and provides most of the components required for TBA functionality.
144141

145142
Notably, the extension library includes built-in support for **Microsoft EntraID**, offering a seamless integration as part of the generic solution.
146143

147-
For more details and examples, please refer to the [Advanced Usage](docs/advanced-usage.md) documentation.
144+
For more details and examples, please refer to the [Advanced Usage](https://redis.github.io/jedis/advanced-usage/) documentation.
148145

149146
## Documentation
150147

151-
The [Jedis wiki](http://github.com/redis/jedis/wiki) contains several useful articles for using Jedis.
148+
The [Jedis documentation site](https://redis.github.io/jedis/) contains several useful articles for using Jedis.
152149

153150
You can also check the [latest Jedis Javadocs](https://www.javadoc.io/doc/redis.clients/jedis/latest/index.html).
154151

155152
Some specific use-case examples can be found in [`redis.clients.jedis.examples`
156-
package](src/test/java/redis/clients/jedis/examples/) of the test source codes.
153+
package](https://github.com/redis/jedis/tree/master/src/test/java/redis/clients/jedis/examples/) of the test source codes.
157154

158155
## Troubleshooting
159156

@@ -178,4 +175,4 @@ Jedis is licensed under the [MIT license](https://github.com/redis/jedis/blob/ma
178175

179176
## Sponsorship
180177

181-
[![Redis Logo](redis-logo-full-color-rgb.png)](https://redis.io/)
178+
[![Redis Logo](https://raw.githubusercontent.com/redis/jedis/master/redis-logo-full-color-rgb.png)](https://redis.io/)

docs/jedis-maven.md

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,29 +6,35 @@
66
<dependency>
77
<groupId>redis.clients</groupId>
88
<artifactId>jedis</artifactId>
9-
<version>6.0.0</version>
9+
<version>6.2.0</version>
1010
</dependency>
1111
```
1212

1313
### Snapshots
1414

1515
```xml
16-
<repositories>
16+
<repositories>
1717
<repository>
18-
<id>snapshots-repo</id>
19-
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
18+
<id>sonatype-snapshots</id>
19+
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
20+
<releases>
21+
<enabled>false</enabled>
22+
</releases>
23+
<snapshots>
24+
<enabled>true</enabled>
25+
</snapshots>
2026
</repository>
21-
</repositories>
27+
</repositories>
2228
```
2329

2430
and
2531

2632
```xml
27-
<dependencies>
33+
<dependencies>
2834
<dependency>
29-
<groupId>redis.clients</groupId>
30-
<artifactId>jedis</artifactId>
31-
<version>6.1.0-SNAPSHOT</version>
35+
<groupId>redis.clients</groupId>
36+
<artifactId>jedis</artifactId>
37+
<version>7.0.0-SNAPSHOT</version>
3238
</dependency>
33-
</dependencies>
39+
</dependencies>
3440
```

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ plugins:
1919

2020
nav:
2121
- Home: index.md
22+
- Jedis Maven: jedis-maven.md
2223
- Migrating to newer versions:
2324
- Jedis 5: breaking-5.md
2425
- Jedis 4:
@@ -35,4 +36,5 @@ nav:
3536
- Tutorials and Examples: tutorials_examples.md
3637
- Jedis Guide: https://redis.io/docs/latest/develop/connect/clients/java/jedis/
3738
- Redis Command Reference: https://redis.io/docs/latest/commands/
39+
- Advanced Usage: advanced-usage.md
3840

0 commit comments

Comments
 (0)