@@ -207,10 +207,7 @@ export function buildConnectionInfoFromClusterDescription(
207207 const instanceSize = getInstanceSize ( description ) ;
208208
209209 return {
210- // Cluster name is unique inside the project (hence using it in the backend
211- // urls as identifier) and using it as an id makes our job of mapping routes
212- // to compass state easier
213- id : description . name ,
210+ id : description . uniqueId ,
214211 connectionOptions : {
215212 connectionString : connectionString . toString ( ) ,
216213 lookup : ( ) => {
@@ -265,7 +262,7 @@ export class AtlasCloudConnectionStorage
265262 implements ConnectionStorage
266263{
267264 private loadAllPromise : Promise < ConnectionInfo [ ] > | undefined ;
268- private canUseNewConnectionInfoEndpoint = true ;
265+ private useNewConnectionInfoEndpoint = true ;
269266 constructor (
270267 private atlasService : AtlasService ,
271268 private orgId : string ,
@@ -420,15 +417,10 @@ export class AtlasCloudConnectionStorage
420417
421418 loadAll ( ) : Promise < ConnectionInfo [ ] > {
422419 this . loadAllPromise ??= ( async ( ) => {
423- if ( this . canUseNewConnectionInfoEndpoint === false ) {
424- return this . _loadAndNormalizeClusterDescriptionInfoV1 ( ) ;
425- }
426- try {
427- return await this . _loadAndNormalizeClusterDescriptionInfoV2 ( ) ;
428- } catch ( err ) {
429- this . canUseNewConnectionInfoEndpoint = false ;
420+ if ( this . useNewConnectionInfoEndpoint === false ) {
430421 return this . _loadAndNormalizeClusterDescriptionInfoV1 ( ) ;
431422 }
423+ return await this . _loadAndNormalizeClusterDescriptionInfoV2 ( ) ;
432424 } ) ( ) . finally ( ( ) => {
433425 delete this . loadAllPromise ;
434426 } ) ;
0 commit comments