-
Notifications
You must be signed in to change notification settings - Fork 403
RI-7077: do not switch to cluster if force standalone is set #4569
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
RI-7077: do not switch to cluster if force standalone is set #4569
Conversation
* Fetches cluster nodes | ||
* Creates cluster client to validate connection. Disconnect after check | ||
* Creates database model for cluster connection type | ||
* @param sessionMetadata |
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 wondering why these appeared here. Doesn't seem connected to the standalone issue
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.
because it was missing, which triggers eslint warnings ;)
client, | ||
); | ||
} else if (await isCluster(client)) { | ||
} else if ((await isCluster(client)) && !database.forceStandalone) { |
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.
lets guard it with a test
client, | ||
); | ||
} else if (await isCluster(client)) { | ||
} else if ((await isCluster(client)) && !database.forceStandalone) { |
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 would suggest you to not even start discovering database type if database.forceStandalone
flag is true
just return model immediately on line 66.
when creating database model, force standalone option was being ignored