Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Redis Client API #26268

Merged
merged 2 commits into from Jun 29, 2022
Merged

New Redis Client API #26268

merged 2 commits into from Jun 29, 2022

Conversation

cescoffier
Copy link
Member

@cescoffier cescoffier commented Jun 21, 2022

The current Redis extension does not provide all the possibilities Redis offers, and the API is not easy to use.

This PR provides a new high-level and type-safe Redis API that covers the previous API's shortcomings.

The previous API is still available but deprecated.

Breaking Changes

Unfortunately, while refactoring the extension, I had to break a few things:

  • Host Providers are now identified using @Identifier instead of @Named (following @mkouba's advice)
  • It is not possible to create dynamic clients - this was done to support pub/sub, which is now supported by the API

What's missing (and will come later)

The PR is already big enough, and some parts will be provided later without breakage:

  • the commands from the stream group are not yet provided (you can use custom commands for the time being)
  • scan operations should provide a flattened stream (so instead of retrieving batches, retrieves the element individually)
  • metrics have been left off for now. It's possible to implement a micrometer binder (work in progress)
  • the LCS command does not provide the IDX option

Related issues

@quarkus-bot

This comment has been minimized.

@machi1990
Copy link
Member

Thanks @cescoffier for this. Very nice improvements.

I'll have a proper look in the next couple of days.

@ebullient
Copy link
Contributor

Is it too much to ask to bring the appropriate doc templates into your new docs?
#25354

docs/src/main/asciidoc/redis.adoc -- Is that meant to be a tutorial? (I believe so.. )
docs/src/main/asciidoc/redis-reference.adoc -- this feels like a combination of a how-to (installation), and a reference (how the extension works and config options, etc.) .. can we split them so we get the docs roughly better in the first pass? (I am happy to help in that regard.. )

@ebullient ebullient moved this from To do to Docs Team Review in Quarkus Documentation Jun 23, 2022
@ebullient ebullient moved this from Docs Team Review to Review pending in Quarkus Documentation Jun 23, 2022
Copy link
Member

@machi1990 machi1990 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left some minor doc suggestions, otherwise lgtm.

Will it be possible to add a migration note as well as there are some breaking changes?

I love the direction that this is taking with typesafety, repository style api, thanks @cescoffier for the PR.

docs/src/main/asciidoc/redis-reference.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/redis-reference.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/redis-reference.adoc Outdated Show resolved Hide resolved
docs/src/main/asciidoc/redis-reference.adoc Outdated Show resolved Hide resolved
Quarkus Documentation automation moved this from Review pending to Reviewer approved Jun 23, 2022
@quarkus-bot

This comment has been minimized.

@quarkus-bot

This comment has been minimized.

@quarkus-bot quarkus-bot bot added the area/dependencies Pull requests that update a dependency file label Jun 25, 2022
@quarkus-bot

This comment has been minimized.

Vert.x 4.3.1 Redis clients has a few API breakage. This commit works around them.

In addition, Redis 7.0 dropped the host and post commands.
These commands are not exposed in the new API and are deprecated in the old one.
@quarkus-bot
Copy link

quarkus-bot bot commented Jun 29, 2022

Failing Jobs - Building 31af6c9

Status Name Step Failures Logs Raw logs
Maven Tests - JDK 11 Windows Build Failures Logs Raw logs

Full information is available in the Build summary check run.

Failures

⚙️ Maven Tests - JDK 11 Windows #

- Failing: integration-tests/maven 

📦 integration-tests/maven

io.quarkus.maven.it.DevMojoIT.testCapabilitiesConflict line 108 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.test.devmode.util.DevModeTestUtils that uses java.util.function.Supplier, java.util.function.Supplierjava.util.concurrent.atomic.AtomicReference, java.util.concurrent.atomic.AtomicReferencejava.lang.String, java.lang.Stringboolean was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

io.quarkus.maven.it.DevMojoIT.testCapabilitiesConflict line 108 - More details - Source on GitHub

org.awaitility.core.ConditionTimeoutException: Condition with lambda expression in io.quarkus.test.devmode.util.DevModeTestUtils that uses java.util.function.Supplier, java.util.function.Supplierjava.util.concurrent.atomic.AtomicReference, java.util.concurrent.atomic.AtomicReferencejava.lang.String, java.lang.Stringboolean was not fulfilled within 1 minutes.
	at org.awaitility.core.ConditionAwaiter.await(ConditionAwaiter.java:167)
	at org.awaitility.core.CallableCondition.await(CallableCondition.java:78)

@cescoffier cescoffier merged commit e6777d2 into quarkusio:main Jun 29, 2022
Quarkus Documentation automation moved this from Reviewer approved to Done Jun 29, 2022
@quarkus-bot quarkus-bot bot added this to the 2.11 - main milestone Jun 29, 2022
@cescoffier cescoffier deleted the new-redis-api branch June 29, 2022 11:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
3 participants