Skip to content

Change Redis to Valkey in log messages#226

Merged
zuiderkwast merged 7 commits into
valkey-io:unstablefrom
9bany:rename/redis-log-acl-2
Apr 17, 2024
Merged

Change Redis to Valkey in log messages#226
zuiderkwast merged 7 commits into
valkey-io:unstablefrom
9bany:rename/redis-log-acl-2

Conversation

@9bany

@9bany 9bany commented Apr 5, 2024

Copy link
Copy Markdown
Contributor

Log messages containing "Redis" in some files are changed.

Add macro SERVER_TITLE defined to "Valkey" (uppercase V) is introduced and used in log messages, so at least it will be easy to patch this definition to get Redis or any other name in the logs instead of Valkey.

Change "Redis" in some log messages to use %s and SERVER_TITLE.

This is a partial implementation of #207

Signed-off-by: 0del <bany.y0599@gmail.com>
@9bany

9bany commented Apr 5, 2024

Copy link
Copy Markdown
Contributor Author

a smaller PR 😄 @zuiderkwast

@9bany 9bany changed the title Rename redis to valkey and redis.conf to valkey.conf in log Rename redis to valkey and redis.conf to valkey.conf in acl log Apr 5, 2024
Signed-off-by: 0del <bany.y0599@gmail.com>
@PingXie

PingXie commented Apr 5, 2024

Copy link
Copy Markdown
Member

Let's use the indirection (via SERVER_NAME) set up by #47 so we can easily build a binary that logs in the exact same way.

@9bany

9bany commented Apr 5, 2024

Copy link
Copy Markdown
Contributor Author

@PingXie i see, let me make some changes

@zuiderkwast zuiderkwast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We'll probably want this to be controlled by a compatibility config, to be as compatible as possible with redis in terms of script parsing the logs, etc. We'll not do this in our first release anyway.

Please leave this PR open for discussion so we can decide later.

@9bany

9bany commented Apr 6, 2024

Copy link
Copy Markdown
Contributor Author

Related: #43

@9bany 9bany closed this Apr 6, 2024
@zuiderkwast

Copy link
Copy Markdown
Contributor

Please leave this PR open for discussion so we can decide later.

Closed the pr? Don't want to leave it open?

@9bany

9bany commented Apr 6, 2024

Copy link
Copy Markdown
Contributor Author

Sorry, i forget to open a issue
i created one #240

@zuiderkwast

Copy link
Copy Markdown
Contributor

I'm going to open this again.

@zuiderkwast zuiderkwast reopened this Apr 10, 2024
@zuiderkwast zuiderkwast added the rebranding Valkey is not Redis label Apr 10, 2024
@9bany

9bany commented Apr 10, 2024

Copy link
Copy Markdown
Contributor Author

What is the problem needed to change in this PR @zuiderkwast ?

@zuiderkwast

Copy link
Copy Markdown
Contributor

What is the problem needed to change in this PR @zuiderkwast ?

Nothing. I just want it to be open and waiting. :)

I wrote earlier "Please leave this PR open for discussion so we can decide later."

I want this PR but I am not a dictator of valkey. The other maintainers need to decide about it too. But right now we are busy with our first release (7.2.4) and this change is better for the next release (8.0).

@zuiderkwast zuiderkwast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Don't merge. See #207.

9bany added 3 commits April 13, 2024 22:23
Signed-off-by: 0del <bany.y0599@gmail.com>
Signed-off-by: 0del <bany.y0599@gmail.com>
Signed-off-by: 0del <bany.y0599@gmail.com>
Comment thread src/version.h
@@ -1,4 +1,5 @@
#define SERVER_NAME "valkey"
#define SERVER_TITLE "Valkey"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Was the reason to make this SERVER_TITLE to make it independent from SERVER_NAME so we could add the compatibility switch later?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's "Valkey" vs "valkey". It was discussed elsewhere (some clicks away).

@0del please update the PR title and write a description about the change, including what SERVER_TITLE is.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

And yes, also for the compat switch.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Maybe call it SERVER_NAME_LOWER then? At first glance I didn't notice the difference

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

TITLE is in "title case", i.e. first letter capitalized.

(It was my suggestion.)

@9bany 9bany changed the title Rename redis to valkey and redis.conf to valkey.conf in acl log Rename redis to valkey Apr 15, 2024
@9bany 9bany requested review from madolson and zuiderkwast April 15, 2024 01:58
Comment thread src/acl.c
Comment on lines 2574 to +2575
serverLog(LL_WARNING,
"Configuring Redis with users defined in redis.conf and at "
"Configuring %s with users defined in valkey.conf and at "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The purpose of having %s here is to be keep to the log messages exactly as they were in Redis, because someone may search for exactly this string in the logs. If we want to support that, we must also keep "redis.conf" instead of "valkey.conf". Otherwise the string is still changed.

Personally, I think it makes no have the special compatibility mode for a log message like this one.

@PingXie FYI

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It's a little bit strange that with the macro, it's possible for a user to patch the macro, like #define SERVER_TITLE "Redis", to make this message say "Redis" but it will still contain "valkey.conf" so the message is still not identical to in Redis. But we decided that we don't need to be 100% compatible in these log messages, I'm going to ignore that. We need to finish this rebranding some time. :)

@zuiderkwast zuiderkwast left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I'm fine with these changes. We've decided that log messages don't need to be identical to Redis log messages (except the markers for the crash report).

Comment thread src/version.h
Signed-off-by: 0del <bany.y0599@gmail.com>
@9bany 9bany requested a review from zuiderkwast April 17, 2024 06:06
@zuiderkwast zuiderkwast changed the title Rename redis to valkey Change Redis to Valkey in log messages Apr 17, 2024
@zuiderkwast zuiderkwast merged commit 96d14fe into valkey-io:unstable Apr 17, 2024
zuiderkwast pushed a commit to zuiderkwast/valkey that referenced this pull request Apr 17, 2024
Log messages containing "Redis" in some files are changed.

Add macro SERVER_TITLE defined to "Valkey" (uppercase V) is introduced
and used in log messages, so at least it will be easy to patch this
definition to get Redis or any other name in the logs instead of Valkey.

Change "Redis" in some log messages to use %s and SERVER_TITLE.

This is a partial implementation of
valkey-io#207

---------

Signed-off-by: 0del <bany.y0599@gmail.com>
PatrickJS pushed a commit to PatrickJS/placeholderkv that referenced this pull request Apr 24, 2024
Log messages containing "Redis" in some files are changed.

Add macro SERVER_TITLE defined to "Valkey" (uppercase V) is introduced
and used in log messages, so at least it will be easy to patch this
definition to get Redis or any other name in the logs instead of Valkey.

Change "Redis" in some log messages to use %s and SERVER_TITLE.

This is a partial implementation of
valkey-io#207

---------

Signed-off-by: 0del <bany.y0599@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rebranding Valkey is not Redis

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants