Skip to content

Commit

Permalink
feat: add a redis extension
Browse files Browse the repository at this point in the history
Creates a redis-client extension that provides different flavours of
redis clients:
Imperative and Reactive client.

Fixes #4453
  • Loading branch information
machi1990 committed Jul 3, 2020
1 parent 1351db3 commit 495e017
Show file tree
Hide file tree
Showing 31 changed files with 5,639 additions and 22 deletions.
3 changes: 3 additions & 0 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,3 +287,6 @@ labelPRBasedOnFilePath:
- integration-tests/vertx/**/*
- integration-tests/vertx-graphql/**/*
- integration-tests/vertx-http/**/*
area/redis:
- extensions/redis-client/**/*
- integration-tests/redis-client/**/*
32 changes: 20 additions & 12 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ on:
env:
# Workaround testsuite locale issue
LANG: en_US.UTF-8
NATIVE_TEST_MAVEN_OPTS: "-B --settings .github/mvn-settings.xml --fail-at-end -Dquarkus.native.container-build=true -Dtest-postgresql -Dtest-elasticsearch -Dtest-keycloak -Dtest-amazon-services -Dtest-db2 -Dtest-mysql -Dtest-mariadb -Dmariadb.base_url='jdbc:mariadb://localhost:3308' -Dmariadb.url='jdbc:mariadb://localhost:3308/hibernate_orm_test' -Dtest-mssql -Dtest-vault -Dtest-neo4j -Dtest-kafka -Dnative-image.xmx=5g -Dnative -Dformat.skip install"
JVM_TEST_MAVEN_OPTS: "-e -B --settings .github/mvn-settings.xml -Dtest-postgresql -Dtest-elasticsearch -Dtest-db2 -Dtest-mysql -Dtest-mariadb -Dmariadb.base_url='jdbc:mariadb://localhost:3308' -Dmariadb.url='jdbc:mariadb://localhost:3308/hibernate_orm_test' -Dtest-mssql -Dtest-amazon-services -Dtest-vault -Dtest-neo4j -Dtest-kafka -Dtest-keycloak -Dformat.skip"
NATIVE_TEST_MAVEN_OPTS: "-B --settings .github/mvn-settings.xml --fail-at-end -Dquarkus.native.container-build=true -Dtest-postgresql -Dtest-elasticsearch -Dtest-keycloak -Dtest-amazon-services -Dtest-db2 -Dtest-mysql -Dtest-mariadb -Dmariadb.base_url='jdbc:mariadb://localhost:3308' -Dmariadb.url='jdbc:mariadb://localhost:3308/hibernate_orm_test' -Dtest-mssql -Dtest-vault -Dtest-neo4j -Dtest-kafka -Dtest-redis -Dnative-image.xmx=5g -Dnative -Dformat.skip install"
JVM_TEST_MAVEN_OPTS: "-e -B --settings .github/mvn-settings.xml -Dtest-postgresql -Dtest-elasticsearch -Dtest-db2 -Dtest-mysql -Dtest-mariadb -Dmariadb.base_url='jdbc:mariadb://localhost:3308' -Dmariadb.url='jdbc:mariadb://localhost:3308/hibernate_orm_test' -Dtest-mssql -Dtest-amazon-services -Dtest-vault -Dtest-neo4j -Dtest-kafka -Dtest-keycloak -Dtest-redis -Dformat.skip"
DB_USER: hibernate_orm_test
DB_PASSWORD: hibernate_orm_test
DB_NAME: hibernate_orm_test
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
- name: Compute cache restore key
# Always recompute on a push so that the maven repo doesnt grow indefinitely with old versions
run: |
if ${{ github.event_name == 'pull_request' }}; then echo "::set-env name=COMPUTED_RESTORE_KEY::q2maven-"; fi
if ${{ github.event_name == 'pull_request' }}; then echo "::set-env name=COMPUTED_RESTORE_KEY::q2maven-"; fi
- name: Cache Maven Repository
id: cache-maven
uses: n1hility/cache@v2
Expand Down Expand Up @@ -164,7 +164,7 @@ jobs:
image: neo4j/neo4j-experimental:4.0.0-rc01
env:
NEO4J_AUTH: neo4j/secret
NEO4J_dbms_memory_pagecache_size: 10M
NEO4J_dbms_memory_pagecache_size: 10M
NEO4J_dbms_memory_heap_initial__size: 10M
ports:
- 127.0.0.1:7687:7687
Expand All @@ -180,7 +180,10 @@ jobs:
- 127.0.0.1:8010:4576
- 127.0.0.1:8011:4599
- 127.0.0.1:8012:4566

redis:
image: redis:5.0.8-alpine
ports:
- 127.0.0.1:6379:6379
steps:
- name: Start mysql
shell: bash
Expand Down Expand Up @@ -285,7 +288,7 @@ jobs:
timeout-minutes: 180
env:
MAVEN_OPTS: -Xmx1408m

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
Expand Down Expand Up @@ -385,7 +388,7 @@ jobs:
with:
name: test-reports-tcks
path: 'test-reports.tgz'

native-tests:
name: Native Tests - ${{matrix.category}}
needs: build-jdk11
Expand Down Expand Up @@ -436,10 +439,12 @@ jobs:
liquibase
- category: Data4
neo4j: "true"
timeout: 50
redis: "true"
timeout: 55
test-modules: >
mongodb-client
mongodb-panache
redis-client
neo4j
hibernate-orm-rest-data-panache
- category: Data5
Expand Down Expand Up @@ -560,9 +565,9 @@ jobs:
# These should be services, but services do not (yet) allow conditional execution
- name: Postgres Service
run: |
docker run --rm --publish 5432:5432 --name build-postgres \
-e POSTGRES_USER=$DB_USER -e POSTGRES_PASSWORD=$DB_PASSWORD -e POSTGRES_DB=$DB_NAME \
-d postgres:10.5
docker run --rm --publish 5432:5432 --name build-postgres \
-e POSTGRES_USER=$DB_USER -e POSTGRES_PASSWORD=$DB_PASSWORD -e POSTGRES_DB=$DB_NAME \
-d postgres:10.5
if: matrix.postgres
- name: MySQL Service
run: |
Expand Down Expand Up @@ -600,6 +605,9 @@ jobs:
-e NEO4J_AUTH=neo4j/secret -e NEO4J_dbms_memory_pagecache_size=10M -e NEO4J_dbms_memory_heap_initial__size=10M \
-d neo4j/neo4j-experimental:4.0.0-rc01
if: matrix.neo4j
- name: Redis Service
run: docker run --rm --publish 6379:6379 --name build-redis -d redis:5.0.8-alpine
if: matrix.redis
- name: Keycloak Service
run: |
docker run --rm --publish 8180:8080 --publish 8543:8443 --name build-keycloak \
Expand All @@ -626,7 +634,7 @@ jobs:
shell: bash
run: tar -xzf maven-repo.tgz -C ~
- name: Build with Maven
env:
env:
TEST_MODULES: ${{matrix.test-modules}}
CATEGORY: ${{matrix.category}}
run: |
Expand Down
12 changes: 6 additions & 6 deletions bom/deployment/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>quarkus-parent</artifactId>
<groupId>io.quarkus</groupId>
Expand All @@ -17,10 +17,10 @@
<dependencyManagement>
<dependencies>

<!--
DO NOT ADD NEW DEPENDENCIES HERE!
THIS BOM IS DEPRECATED IN FAVOR OF quarkus-bom.
-->
<!--
DO NOT ADD NEW DEPENDENCIES HERE!
THIS BOM IS DEPRECATED IN FAVOR OF quarkus-bom.
-->

<!-- Third party deployment dependencies -->

Expand Down
17 changes: 17 additions & 0 deletions bom/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3496,6 +3496,11 @@
<artifactId>smallrye-mutiny-vertx-mail-client</artifactId>
<version>${mutiny-client.version}</version>
</dependency>
<dependency>
<groupId>io.smallrye.reactive</groupId>
<artifactId>smallrye-mutiny-vertx-redis-client</artifactId>
<version>${mutiny-client.version}</version>
</dependency>
<dependency>
<groupId>io.vertx</groupId>
<artifactId>vertx-rx-java2</artifactId>
Expand Down Expand Up @@ -4100,6 +4105,18 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-redis-client</artifactId>
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-redis-client-deployment</artifactId>
<version>${project.version}</version>
</dependency>

<!-- Qute -->
<dependency>
<groupId>io.quarkus.qute</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ public enum Feature {
OIDC,
PICOCLI,
QUTE,
REDIS_CLIENT,
RESTEASY,
RESTEASY_JACKSON,
RESTEASY_JAXB,
Expand Down Expand Up @@ -114,8 +115,7 @@ public enum Feature {
VERTX,
VERTX_WEB,
VERTX_GRAPHQL,
WEBJARS_LOCATOR,
;
WEBJARS_LOCATOR;

public String getName() {
return toString().toLowerCase().replace("_", "-");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,11 @@ public FeatureBuildItem(String name) {

/**
* The name that gets displayed in the log.
*
*
* @return the name
*/
public String getName() {
return name;
}

}
}
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ include::quarkus-intro.adoc[tag=intro]
* link:command-mode-reference.html[Command Mode Applications]
* link:grpc.html[Using gRPC]
* link:picocli.html[Command Mode with Picocli]
* link:redis.html[Connecting to Redis]

* link:faq.html[FAQs]

Expand Down
1 change: 1 addition & 0 deletions docs/src/main/asciidoc/native-and-ssl.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ As SSL is de facto the standard nowadays, we decided to enable its support autom
* the Keycloak extension (`quarkus-keycloak`),
* the Kubernetes client extension (`quarkus-kubernetes-client`),
* the Mailer extension (`quarkus-mailer`),
* the Redis client extension (`quarkus-redis-client`),
* the MongoDB extension (`quarkus-mongodb-client`),
* the Neo4j extension (`quarkus-neo4j`),
* the OAuth2 extension (`quarkus-elytron-security-oauth2`),
Expand Down
Loading

0 comments on commit 495e017

Please sign in to comment.