Skip to content

Commit

Permalink
feat: add a redis extension
Browse files Browse the repository at this point in the history
Creates a vertx redis extension that provides different flavours of RedisAPI.

fixes #4453
  • Loading branch information
machi1990 committed May 16, 2020
1 parent a18562d commit cb7a3b8
Show file tree
Hide file tree
Showing 27 changed files with 2,759 additions and 16 deletions.
2 changes: 2 additions & 0 deletions .github/boring-cyborg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,11 @@ labelPRBasedOnFilePath:
- extensions/vertx/**/*
- extensions/vertx-core/**/*
- extensions/vertx-graphql/**/*
- extensions/vertx-redis/**/*
- extensions/vertx-http/**/*
- extensions/vertx-keycloak/**/*
- extensions/vertx-web/**/*
- integration-tests/vertx/**/*
- integration-tests/vertx-graphql/**/*
- integration-tests/vertx-redis/**/*
- integration-tests/vertx-http/**/*
40 changes: 24 additions & 16 deletions .github/workflows/ci-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,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 -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:19.3.1-java11 -Dtest-postgresql -Dtest-elasticsearch -Dtest-keycloak -Dtest-amazon-services -Dtest-mysql -Dtest-mariadb -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-mysql -Dtest-mariadb -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 -Dquarkus.native.builder-image=quay.io/quarkus/ubi-quarkus-native-image:19.3.1-java11 -Dtest-postgresql -Dtest-elasticsearch -Dtest-keycloak -Dtest-amazon-services -Dtest-mysql -Dtest-redis -Dtest-mariadb -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-mysql -Dtest-mariadb -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 @@ -70,7 +70,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 @@ -158,7 +158,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 @@ -172,7 +172,10 @@ jobs:
- 127.0.0.1:8008:4572
- 127.0.0.1:8009:4575
- 127.0.0.1:8010:4576

redis:
image: redis:5.0.8-alpine
ports:
- 127.0.0.1:6379:6379
steps:
- name: Start mysql
shell: bash
Expand Down Expand Up @@ -209,7 +212,7 @@ jobs:
- name: Prepare failure archive (if maven failed)
if: failure()
shell: bash
run: find . -name '*-reports' -type d | tar -czvf test-reports.tgz -T -
run: find . -name '*-reports' -type d | tar -czvf test-reports.tgz -T -
- name: Upload failure Archive (if maven failed)
uses: actions/upload-artifact@v1
if: failure()
Expand All @@ -224,7 +227,7 @@ jobs:
timeout-minutes: 120
env:
MAVEN_OPTS: -Xmx1408m

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
Expand Down Expand Up @@ -275,7 +278,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:
- 7687:7687
Expand Down Expand Up @@ -319,14 +322,14 @@ jobs:
- name: Prepare failure archive (if maven failed)
if: failure()
shell: bash
run: find . -name '*-reports' -type d | tar -czvf test-reports.tgz -T -
run: find . -name '*-reports' -type d | tar -czvf test-reports.tgz -T -
- name: Upload failure Archive (if maven failed)
uses: actions/upload-artifact@v1
if: failure()
with:
name: test-reports-tcks
path: 'test-reports.tgz'

native-tests:
name: Native Tests - ${{matrix.category}}
needs: build-jdk11
Expand Down Expand Up @@ -373,10 +376,12 @@ jobs:
panache-rest-hibernate-orm
- category: Data4
neo4j: "true"
timeout: 30
redis: "true"
timeout: 45
test-modules: >
mongodb-client
mongodb-panache
vertx-redis
neo4j
- category: Data5
timeout: 30
Expand Down Expand Up @@ -492,9 +497,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 @@ -526,6 +531,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 @@ -552,7 +560,7 @@ jobs:
shell: bash
run: tar -xzvf maven-repo.tgz -C ~
- name: Build with Maven
env:
env:
TEST_MODULES: ${{matrix.test-modules}}
CATEGORY: ${{matrix.category}}
run: |
Expand All @@ -569,7 +577,7 @@ jobs:
- name: Prepare failure archive (if maven failed)
if: failure()
shell: bash
run: find . -name '*-reports' -type d | tar -czvf test-reports.tgz -T -
run: find . -name '*-reports' -type d | tar -czvf test-reports.tgz -T -
- name: Upload failure Archive (if maven failed)
uses: actions/upload-artifact@v1
if: failure()
Expand Down
5 changes: 5 additions & 0 deletions bom/deployment/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -753,6 +753,11 @@
<artifactId>quarkus-jsch-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vertx-redis-deployment</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vault-deployment</artifactId>
Expand Down
11 changes: 11 additions & 0 deletions bom/runtime/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2586,6 +2586,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 @@ -3229,6 +3234,12 @@
<version>${project.version}</version>
</dependency>

<dependency>
<groupId>io.quarkus</groupId>
<artifactId>quarkus-vertx-redis</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 @@ -110,6 +110,7 @@ public final class FeatureBuildItem extends MultiBuildItem {
public static final String VERTX = "vertx";
public static final String VERTX_WEB = "vertx-web";
public static final String VERTX_GRAPHQL = "vertx-graphql";
public static final String VERTX_REDIS = "vertx-redis";

private final String info;

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

* link:faq.html[FAQs]

Expand Down
Loading

0 comments on commit cb7a3b8

Please sign in to comment.