-
Notifications
You must be signed in to change notification settings - Fork 1.9k
[CAE-342] Initial sentinel issues fix #2912
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
base: master
Are you sure you want to change the base?
Conversation
@@ -325,6 +325,10 @@ export default class RedisClient< | |||
return this._self.#watchEpoch !== undefined; | |||
} | |||
|
|||
get isDirtyWatch() { |
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 you please add a tsdoc comment explaining the purpose behind isDirtyWatch / setDirtyWatch?
const sentinelArgs: Array<string> = ["sh", "-c"]; | ||
|
||
let sentinelConfig = ` | ||
port {port} |
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.
Hi @htemelski 👋 We should use our docker container for spawning sentinel instances if we want to be able to switch/skip tests easily between server versions.
@@ -51,21 +50,30 @@ export interface RedisServerDocker { | |||
async function spawnRedisServerDocker({ | |||
image, | |||
version | |||
}: RedisServerDockerConfig, serverArguments: Array<string>): Promise<RedisServerDocker> { | |||
}: RedisServerDockerConfig, serverArguments: Array<string>, dockerEnv?: Map<string, string>): Promise<RedisServerDocker> { |
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.
Instead of adding dockerEnv, dockerBinds, and so on, please add them as optional properties to the RedisServerDockerConfig
like :
export interface VolumeMount {
source: string; // Host path
target: string; // Container path
readonly?: boolean; // Read-only mount
}
export interface RedisServerDockerConfig {
image: string;
version: string;
env?: Record<string, string>;
volumes?: VolumeMount[];
}
Description
Fixed a couple of issues with the sentinel implementation
maxCommandRediscovers
watch
status if there are multiple topology changes during a transactionFixed an issue with the testing setup itself, using the new docker image and setting the
requirepass
andmasterauth
configuration settings in a persistent way.Enabled the majority of sentinel tests, added new test for fix 1.
Still skipping some tests that are flaky and prone to failing
Checklist
npm test
pass with this change (including linting)?