Skip to content

[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

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

[CAE-342] Initial sentinel issues fix #2912

wants to merge 10 commits into from

Conversation

htemelski
Copy link
Collaborator

@htemelski htemelski commented Mar 21, 2025

Description

Fixed a couple of issues with the sentinel implementation

  1. Indefinite reconnects without taking into consideration maxCommandRediscovers
  2. Client losing it's watch status if there are multiple topology changes during a transaction
  3. Fixed sentinel client .withTypeMapping() method

Fixed an issue with the testing setup itself, using the new docker image and setting the requirepass and masterauth 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

  • Does npm test pass with this change (including linting)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?

@@ -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> {
Copy link
Member

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[];
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Do you have a strong preference if it's a volume or a mount?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants