-
Notifications
You must be signed in to change notification settings - Fork 33
fix: add atlas instance size #172
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 updates the atlas cluster listing and inspection tools to include instance size information by adding two new columns and adjusting connection string logic.
- In listClusters.ts, a new fallback for connection strings is added and instance size is derived from replication specs.
- In inspectCluster.ts, the instance size is similarly extracted and the output format is updated to include cluster type and tier.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
File | Description |
---|---|
src/tools/atlas/read/listClusters.ts | Updated connection string logic; added instance size extraction and new output format |
src/tools/atlas/read/inspectCluster.ts | Added extraction of instance size and updated the output message format accordingly |
src/tools/atlas/read/listClusters.ts
Outdated
const clusterInstaceType = instanceSize == "M0" ? "FREE" : "DEDICATED"; | ||
|
||
return `${cluster.name} | ${clusterInstaceType} | ${clusterInstaceType == "DEDICATED" ? instanceSize : "N/A"} | ${cluster.stateName} | ${mongoDBVersion} | ${connectionString}`; |
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.
The variable 'clusterInstaceType' appears to be misspelled; consider renaming it to 'clusterInstanceType' for clarity.
const clusterInstaceType = instanceSize == "M0" ? "FREE" : "DEDICATED"; | |
return `${cluster.name} | ${clusterInstaceType} | ${clusterInstaceType == "DEDICATED" ? instanceSize : "N/A"} | ${cluster.stateName} | ${mongoDBVersion} | ${connectionString}`; | |
const clusterInstanceType = instanceSize == "M0" ? "FREE" : "DEDICATED"; | |
return `${cluster.name} | ${clusterInstanceType} | ${clusterInstanceType == "DEDICATED" ? instanceSize : "N/A"} | ${cluster.stateName} | ${mongoDBVersion} | ${connectionString}`; |
Copilot uses AI. Check for mistakes.
|
||
const instanceSize = (regionConfigs.length <= 0 ? undefined : regionConfigs[0].instanceSize) || "UNKNOWN"; | ||
|
||
const clusterInstaceType = instanceSize == "M0" ? "FREE" : "DEDICATED"; |
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.
The variable 'clusterInstaceType' appears to be misspelled; consider renaming it to 'clusterInstanceType' for clarity.
const clusterInstaceType = instanceSize == "M0" ? "FREE" : "DEDICATED"; | |
const clusterInstanceType = instanceSize == "M0" ? "FREE" : "DEDICATED"; |
Copilot uses AI. Check for mistakes.
adds 2 columns to atlas-list-clusters and atlas-inspect-cluster
fixes #89