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

Update RedisVersion parser to accept version numbers with non-numeric suffix #2557

Closed
devkanro opened this issue Nov 27, 2023 · 3 comments
Closed
Labels
type: feature A new feature
Milestone

Comments

@devkanro
Copy link

Bug Report

Current Behavior

Cloud providers may provide private fixes for Redis, causing their bugfix versions to be somewhat different, which causes link failure after upgrading to Lettuce 6.3.0.

Lettuce should not assume that bugfix version is a standard number.

https://github.com/lettuce-io/lettuce-core/blob/bc4aa0658ac73c496e6006cdf0680e602cb35945/src/main/java/io/lettuce/core/RedisHandshake.java#L337

Environment

  • Lettuce version(s): 6.3.0.RELEASE,
  • Redis version: 6.8.26(Baidu Release)

Possible Solution

Just try parse the bugfix version as int, provide a default value(0) for failed parsing.

@mp911de
Copy link
Collaborator

mp911de commented Nov 27, 2023

OMG.

Lettuce should not assume that bugfix version is a standard number.

Probably stating the obvious, but messing with version numbers that are otherwise all numbers is asking for trouble.

Using Regex seems the better approach for here. Do you want to submit a pull request?

For the time being, please use RESP2 as workaround to avoid the code path that parses the Redis version.

@mp911de mp911de added the type: feature A new feature label Nov 27, 2023
@mp911de mp911de changed the title RedisVersion parse error when used on Cloud with 6.3.0 Update RedisVersion parser to accept version numbers with non-numeric suffix Nov 27, 2023
@devkanro
Copy link
Author

@mp911de PR created #2558

@mp911de
Copy link
Collaborator

mp911de commented Nov 30, 2023

That's fixed now.

@mp911de mp911de closed this as completed Nov 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature A new feature
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants