Skip to content

Conversation

@sarthakaggarwal97
Copy link
Contributor

@sarthakaggarwal97 sarthakaggarwal97 commented Jan 14, 2025

Make LOLWUT it print the current Valkey version rather than the Redis version. Retain the old behaviour and print the compatible Redis version if the extended-redis-compat config is enabled.

Additionally, change "Redis" to "Valkey" in an error message "This Redis command is not allowed from script", also depending on the extended-redis-compat config.

@codecov
Copy link

codecov bot commented Jan 14, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 71.00%. Comparing base (12ec3d5) to head (cf8971d).
Report is 106 commits behind head on unstable.

Additional details and impacted files
@@             Coverage Diff              @@
##           unstable    #1559      +/-   ##
============================================
+ Coverage     70.98%   71.00%   +0.01%     
============================================
  Files           121      121              
  Lines         65176    65176              
============================================
+ Hits          46264    46276      +12     
+ Misses        18912    18900      -12     
Files with missing lines Coverage Δ
src/lolwut.c 21.42% <100.00%> (+21.42%) ⬆️
src/script.c 87.69% <100.00%> (ø)

... and 10 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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.)

@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 may be required for this feature rebranding Valkey is not Redis labels Jan 15, 2025
@ranshid
Copy link
Member

ranshid commented Jan 27, 2025

@sarthakaggarwal97 I just looked. seems like @zuiderkwast suggestion to control this feature via extended-redis-compat might be fine.

@sarthakaggarwal97
Copy link
Contributor Author

@ranshid @zuiderkwast if I understand this correctly, extended-redis-compat is stemming from #274 right?

I see we have a configuration available in valkey.conf as extended-redis-compatibility. So we can continue with this change relying on this configuration?

@zuiderkwast
Copy link
Contributor

@ranshid @zuiderkwast if I understand this correctly, extended-redis-compat is stemming from #274 right?

I see we have a configuration available in valkey.conf as extended-redis-compatibility. So we can continue with this change relying on this configuration?

That's right. I think it's OK to use this config for lolwut. We should make a TSC decision about it though.

I remember when we added this config, there were some concerns that it will give us a lot of extra maintenance work, so we decided to limit the scope to only a few things and to make it temporary and be phased out in 9.0. See the test "Extended Redis Compatibility config" in tests/unit/other.tcl

@hwware hwware added the major-decision-pending Major decision pending by TSC team label Jan 30, 2025
@ranshid
Copy link
Member

ranshid commented Feb 3, 2025

Will just ask again:
why not rebrand the lolwut5Command and lolwut6Command?

@sarthakaggarwal97
Copy link
Contributor Author

@ranshid apologies, but could you please elaborate on the rebranding on commands? What exactly would be required here?

@PingXie
Copy link
Member

PingXie commented Feb 8, 2025

I think it's OK to use this config for lolwut. We should make a TSC decision about it though.

+1

@zuiderkwast zuiderkwast added major-decision-approved Major decision approved by TSC team and removed major-decision-pending Major decision pending by TSC team labels Mar 31, 2025
@zuiderkwast
Copy link
Contributor

We discussed it in a meeting today and decided to use the extended redis compat config for this as implemented in this PR, but the same change needs to be done in lolwut5.c and lolwut6.c too. Waiting for this change before merging.

Signed-off-by: Sarthak Aggarwal <[email protected]>
Signed-off-by: Sarthak Aggarwal <[email protected]>
Signed-off-by: Sarthak Aggarwal <[email protected]>
@sarthakaggarwal97
Copy link
Contributor Author

@zuiderkwast added extended redis compat config for lolwut5, lolwut6 as well. Please check once!

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.

LGTM, thanks.

@ranshid Please take another look.

@enjoy-binbin
Copy link
Member

please also update the top comment.

Signed-off-by: Sarthak Aggarwal <[email protected]>
@sarthakaggarwal97
Copy link
Contributor Author

@enjoy-binbin added those suggestions!

@zuiderkwast zuiderkwast changed the title Rename to Valkey for lolwut command In LOLWUT's reply, change "Redis ver." to "Valkey ver." where version is printed Apr 3, 2025
@zuiderkwast zuiderkwast changed the title In LOLWUT's reply, change "Redis ver." to "Valkey ver." where version is printed In LOLWUT's reply, change "Redis ver." to "Valkey ver." Apr 3, 2025
@zuiderkwast
Copy link
Contributor

please also update the top comment.

Done. Now describing the exact behavior with the config. @sarthakaggarwal97 please note.

@sarthakaggarwal97
Copy link
Contributor Author

@zuiderkwast ah sorry, I got confused. I thought it was just for the suggestion. thank you.

/* There are commands that are not allowed inside scripts. */
if (!server.script_disable_deny_script && (cmd->flags & CMD_NOSCRIPT)) {
*err = sdsnew("This Redis command is not allowed from script");
*err = sdscatprintf(sdsempty(), "This %s command is not allowed from script", server.extended_redis_compat ? "Redis" : "Valkey");
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should mention this change too in the top comment.

@zuiderkwast zuiderkwast merged commit 5cce160 into valkey-io:unstable Apr 3, 2025
49 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Valkey 9.0 Apr 3, 2025
@zuiderkwast zuiderkwast added the release-notes This issue should get a line item in the release notes label Apr 3, 2025
zarkash-aws pushed a commit to zarkash-aws/valkey that referenced this pull request Apr 6, 2025
Make LOLWUT it print the current Valkey version rather than the Redis
version. Retain the old behaviour and print the compatible Redis version
if the `extended-redis-compat` config is enabled.

Additionally, change "Redis" to "Valkey" in an error message "This Redis
command is not allowed from script", also depending on the
`extended-redis-compat` config.

---------

Signed-off-by: Sarthak Aggarwal <[email protected]>
Signed-off-by: Shai Zarka <[email protected]>
murphyjacob4 pushed a commit to enjoy-binbin/valkey that referenced this pull request Apr 13, 2025
Make LOLWUT it print the current Valkey version rather than the Redis
version. Retain the old behaviour and print the compatible Redis version
if the `extended-redis-compat` config is enabled.

Additionally, change "Redis" to "Valkey" in an error message "This Redis
command is not allowed from script", also depending on the
`extended-redis-compat` config.

---------

Signed-off-by: Sarthak Aggarwal <[email protected]>
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 may be required for this feature major-decision-approved Major decision approved by TSC team rebranding Valkey is not Redis release-notes This issue should get a line item in the release notes

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

9 participants