-
Notifications
You must be signed in to change notification settings - Fork 54
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
Node: Rename instances of Redis to Valkey #2260
Node: Rename instances of Redis to Valkey #2260
Conversation
Signed-off-by: Jonathan Louie <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changelog?
Signed-off-by: Jonathan Louie <[email protected]>
You're too fast :P I was in the middle of adding it. |
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
node/npm/glide/index.ts
Outdated
@@ -153,7 +153,7 @@ function initialize() { | |||
RangeByScore, | |||
RangeByLex, | |||
ReadFrom, | |||
RedisCredentials, | |||
ValkeyCredentials, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its server credentials in python and java
ValkeyCredentials, | |
ServerCredentials, |
node/npm/glide/index.ts
Outdated
@@ -265,7 +265,7 @@ function initialize() { | |||
RangeByScore, | |||
RangeByLex, | |||
ReadFrom, | |||
RedisCredentials, | |||
ValkeyCredentials, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ValkeyCredentials, | |
ServerCredentials, |
node/rust-client/src/lib.rs
Outdated
@@ -160,7 +160,7 @@ pub fn init(level: Option<Level>, file_name: Option<&str>) -> Level { | |||
logger_level.into() | |||
} | |||
|
|||
fn redis_value_to_js(val: Value, js_env: Env, string_decoder: bool) -> Result<JsUnknown> { | |||
fn valkey_value_to_js(val: Value, js_env: Env, string_decoder: bool) -> Result<JsUnknown> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can leave it redis_value_to_js
like the other wrappers, since it is a redis value (from redis-rs)
fn valkey_value_to_js(val: Value, js_env: Env, string_decoder: bool) -> Result<JsUnknown> { | |
fn redis_value_to_js(val: Value, js_env: Env, string_decoder: bool) -> Result<JsUnknown> { |
node/rust-client/src/lib.rs
Outdated
@@ -189,7 +189,7 @@ fn redis_value_to_js(val: Value, js_env: Env, string_decoder: bool) -> Result<Js | |||
for (index, item) in array.into_iter().enumerate() { | |||
js_array_view.set_element( | |||
index as u32, | |||
redis_value_to_js(item, js_env, string_decoder)?, | |||
valkey_value_to_js(item, js_env, string_decoder)?, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valkey_value_to_js(item, js_env, string_decoder)?, | |
redis_value_to_js(item, js_env, string_decoder)?, |
node/rust-client/src/lib.rs
Outdated
@@ -198,7 +198,7 @@ fn redis_value_to_js(val: Value, js_env: Env, string_decoder: bool) -> Result<Js | |||
let mut obj = js_env.create_object()?; | |||
for (key, value) in map { | |||
let field_name = String::from_owned_redis_value(key).map_err(to_js_error)?; | |||
let value = redis_value_to_js(value, js_env, string_decoder)?; | |||
let value = valkey_value_to_js(value, js_env, string_decoder)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let value = valkey_value_to_js(value, js_env, string_decoder)?; | |
let value = redis_value_to_js(value, js_env, string_decoder)?; |
node/rust-client/src/lib.rs
Outdated
@@ -280,7 +280,7 @@ pub fn value_from_split_pointer( | |||
.unwrap(); | |||
let pointer = u64::from_le_bytes(bytes); | |||
let value = unsafe { Box::from_raw(pointer as *mut Value) }; | |||
redis_value_to_js(*value, js_env, string_decoder) | |||
valkey_value_to_js(*value, js_env, string_decoder) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
valkey_value_to_js(*value, js_env, string_decoder) | |
redis_value_to_js(*value, js_env, string_decoder) |
node/src/BaseClient.ts
Outdated
@@ -411,7 +411,7 @@ class PointerResponse { | |||
} | |||
|
|||
/** Represents the credentials for connecting to a server. */ | |||
export type RedisCredentials = { | |||
export type ValkeyCredentials = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
export type ValkeyCredentials = { | |
export type ServerCredentials = { |
node/src/BaseClient.ts
Outdated
@@ -467,7 +467,7 @@ export type BaseClientConfiguration = { | |||
* Credentials for authentication process. | |||
* If none are set, the client will not authenticate itself with the server. | |||
*/ | |||
credentials?: RedisCredentials; | |||
credentials?: ValkeyCredentials; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
credentials?: ValkeyCredentials; | |
credentials?: ServerCredentials; |
@@ -20,7 +20,7 @@ import { | |||
RequestError, | |||
Transaction, | |||
} from ".."; | |||
import { RedisCluster } from "../../utils/TestUtils.js"; | |||
import { ValkeyCluster } from "../../utils/TestUtils.js"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am pretty sure we left it in python as redis cluster as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm pretty sure I also have a task to change instances of Redis in Python to Valkey as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ohh okay, it doesn't really matter tbh, but it's nice ig
node/tests/GlideClient.test.ts
Outdated
@@ -481,22 +481,22 @@ describe("GlideClient", () => { | |||
); | |||
|
|||
const result = await client.lolwut(); | |||
expect(result).toEqual(expect.stringContaining("Redis ver. ")); | |||
expect(result).toEqual(expect.stringContaining("Valkey ver. ")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this will fail
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct. The output is still "Redis ver. ". Please double check.
node/rust-client/src/lib.rs
Outdated
@@ -160,7 +160,7 @@ pub fn init(level: Option<Level>, file_name: Option<&str>) -> Level { | |||
logger_level.into() | |||
} | |||
|
|||
fn redis_value_to_js(val: Value, js_env: Env, string_decoder: bool) -> Result<JsUnknown> { | |||
fn valkey_value_to_js(val: Value, js_env: Env, string_decoder: bool) -> Result<JsUnknown> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fn valkey_value_to_js(val: Value, js_env: Env, string_decoder: bool) -> Result<JsUnknown> { | |
fn resp_value_to_js(val: Value, js_env: Env, string_decoder: bool) -> Result<JsUnknown> { |
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: jonathanl-bq <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: jonathanl-bq <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please double check that you have the latest main changes.
} | ||
// Negative cursor | ||
if (cluster.checkIfServerVersionLessThan("7.9.0")) { | ||
result = await client.hscan(key1, "-1"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you want to replace initialCursor throughout?
Signed-off-by: Jonathan Louie <[email protected]>
Co-authored-by: Andrew Carbonetto <[email protected]> Signed-off-by: jonathanl-bq <[email protected]>
Signed-off-by: Jonathan Louie <[email protected]>
No description provided.