Skip to content

Conversation

pd-redis
Copy link
Collaborator

when creating database model, force standalone option was being ignored

* Fetches cluster nodes
* Creates cluster client to validate connection. Disconnect after check
* Creates database model for cluster connection type
* @param sessionMetadata
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm wondering why these appeared here. Doesn't seem connected to the standalone issue

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

because it was missing, which triggers eslint warnings ;)

client,
);
} else if (await isCluster(client)) {
} else if ((await isCluster(client)) && !database.forceStandalone) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

lets guard it with a test

client,
);
} else if (await isCluster(client)) {
} else if ((await isCluster(client)) && !database.forceStandalone) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

I would suggest you to not even start discovering database type if database.forceStandalone flag is true
just return model immediately on line 66.

@KIvanow KIvanow merged commit f2c2bdc into main May 23, 2025
29 checks passed
@KIvanow KIvanow deleted the bugfix/be/RI-7077-forcestandalone-in-test-connection branch May 23, 2025 09:34
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.

4 participants