-
Notifications
You must be signed in to change notification settings - Fork 161
fix: creating multiple users on atlas connect [MCP-280] #721
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
Conversation
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.
Pull Request Overview
This PR fixes a bug where the atlas-connect-cluster tool could create multiple database users instead of just one. The fix refactors the connection state logic to check and prepare the cluster connection only once before the polling loop, preventing repeated calls to prepareClusterConnection (which creates users) during connection retries.
Key changes:
- Moved cluster connection preparation logic outside the polling loop
- Added initial connection state check before the retry loop begins
- Removed duplicate connection logic from within the polling loop
Pull Request Test Coverage Report for Build 19293756954Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
| beforeAll(async () => { | ||
| let connected = false; | ||
| for (let i = 0; i < 10; i++) { | ||
| const response = await integration.mcpClient().callTool({ |
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.
[q] why do we need to call connect several times, shouldn't we connect and wait a considerable amount of time and that should be enough?
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 is the edge case where atlas can take a long time to provision the DB user to data plane, in which case we need to keep waiting
blva
left a comment
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.
non-blocking comments, thanks for the fix and coverage!
Co-authored-by: Bianca Lisle <40155621+blva@users.noreply.github.com>
Proposed changes
sometimes atlas connect tool would create multiple users instead of one, this fixes it.
Checklist