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

Rename to Valkey for lolwut command #1559

Open
wants to merge 1 commit into
base: unstable
Choose a base branch
from

Conversation

sarthakaggarwal97
Copy link
Contributor

While trying out few commands in the codebase, I found that upon executing lolwut command on unstable, it still returns Redis Ver. Thought, since we are on unstable, maybe we should remove this?

Let me know if that isn't the case.

Screenshot 2025-01-14 at 11 48 59 AM

Signed-off-by: Sarthak Aggarwal <[email protected]>
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.93%. Comparing base (2a1a65b) to head (017d7ab).
Report is 1 commits behind head on unstable.

Files with missing lines Patch % Lines
src/lolwut.c 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1559      +/-   ##
============================================
+ Coverage     70.78%   70.93%   +0.15%     
============================================
  Files           120      120              
  Lines         65046    65060      +14     
============================================
+ Hits          46045    46153     +108     
+ Misses        19001    18907      -94     
Files with missing lines Coverage Δ
src/lolwut.c 0.00% <0.00%> (ø)

... and 11 files with indirect coverage changes

Copy link
Contributor

@zuiderkwast zuiderkwast left a comment

Choose a reason for hiding this comment

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

Good, but we can avoid hard-coding the name.

(It's weird that we have SERVER_TITLE but we decided to name the version variable VALKEY_VERSION instead of SERVER_VERSION. Maybe there was a reason for that. I don't remember the discussion.)

@@ -43,7 +43,7 @@ void lolwut6Command(client *c);
/* The default target for LOLWUT if no matching version was found.
* This is what unstable versions of the server will display. */
void lolwutUnstableCommand(client *c) {
sds rendered = sdsnew("Redis ver. ");
sds rendered = sdsnew("Valkey ver. ");
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
sds rendered = sdsnew("Valkey ver. ");
sds rendered = sdsnew(SERVER_TITLE " ver. ");

Copy link
Member

Choose a reason for hiding this comment

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

I thought we left this intentionally because it's technically breaking change. Why do we need to change it?

Copy link
Contributor

Choose a reason for hiding this comment

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

I guess because seeing "Redis" anywhere sticks out. :D If we want to keep LOLWUT without updates, then we should probably instead return REDIS_VERSION rather than VALKEY_VERSION?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I guess because seeing "Redis" anywhere sticks out.

Yeah, that's why I raised the change. I wasn't aware that we left this out intentionally.
Do you think that we should take this up in the next major version?

Also, we kinda still use it here as well: https://github.com/valkey-io/valkey/blob/unstable/src/networking.c#L4277

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh, I think we missed those security warning logs. We decided during the initial rebranding work that we don't need compatibility for log messages, so I guess it's OK to change them.

I did a quick grep and I found one more occurrence in an error message in script.c: "This Redis command is not allowed from script". My first thought is that I don't think it's risky to change it, but if we think it is, then we could let it depend on the extended-redis-compat configuration.

Copy link
Contributor Author

@sarthakaggarwal97 sarthakaggarwal97 Jan 15, 2025

Choose a reason for hiding this comment

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

We decided during the initial rebranding work that we don't need compatibility for log messages, so I guess it's OK to change them.

I guess I can raise another PR for this, if that's okay. If we decide on changing in the script.c as well, I am happy to do it as well.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ranshid
Copy link
Member

ranshid commented Jan 15, 2025

Trying to understand the issue. AFAIK changing the lolwut can break some clients using it in order to get the current verison.
I agree that providing the unstable version is problematic and we might want to do the same as we did with the info server version (i.e use fixed 7.2.4).

The other issue is that we also have the "Easter eggs" lolwat (which are somewhat broken, for example you cannot enter lolwut which are also presenting the VALKEY_VERSION version and Redis brand (I wonder if these we can be changed).

In anycase I think this should be marked as a breaking change

@ranshid ranshid added breaking-change Indicates a possible backwards incompatible change client-changes-needed Client changes are required for this feature rebranding Valkey is not Redis labels Jan 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Indicates a possible backwards incompatible change client-changes-needed Client changes are required for this feature rebranding Valkey is not Redis
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants