diff --git a/packages/atlas-service/src/atlas-service.ts b/packages/atlas-service/src/atlas-service.ts index 9069dde11ef..8abe8f2c03b 100644 --- a/packages/atlas-service/src/atlas-service.ts +++ b/packages/atlas-service/src/atlas-service.ts @@ -107,7 +107,11 @@ export class AtlasService { automationAgentFetch( atlasMetadata: Pick< AtlasClusterMetadata, - 'projectId' | 'clusterUniqueId' | 'regionalBaseUrl' | 'metricsType' + | 'projectId' + | 'clusterUniqueId' + | 'regionalBaseUrl' + | 'metricsType' + | 'metricsId' >, opType: OpType, opBody: Omit< @@ -118,7 +122,7 @@ export class AtlasService { const opBodyClusterId = atlasMetadata.metricsType === 'serverless' ? { serverlessId: atlasMetadata.clusterUniqueId } - : { clusterId: atlasMetadata.clusterUniqueId }; + : { clusterId: atlasMetadata.metricsId }; return makeAutomationAgentOpRequest( this.authenticatedFetch.bind(this), this.regionalizedCloudEndpoint(atlasMetadata), diff --git a/packages/compass-web/scripts/start-electron-proxy.js b/packages/compass-web/scripts/start-electron-proxy.js index f70b733fe29..dbbc4e2f1f0 100644 --- a/packages/compass-web/scripts/start-electron-proxy.js +++ b/packages/compass-web/scripts/start-electron-proxy.js @@ -4,11 +4,13 @@ const child_process = require('child_process'); const electronPath = require('electron'); function startElectronProxy() { - child_process.execFile( + const child = child_process.execFile( electronPath, [path.resolve(__dirname, 'electron-proxy.js')], { env: process.env } ); + child.stdout.pipe(process.stdout); + child.stderr.pipe(process.stderr); } module.exports = { startElectronProxy }; diff --git a/packages/compass-web/src/connection-storage.tsx b/packages/compass-web/src/connection-storage.tsx index 3ef497b78d4..213a22b919e 100644 --- a/packages/compass-web/src/connection-storage.tsx +++ b/packages/compass-web/src/connection-storage.tsx @@ -281,9 +281,13 @@ class AtlasCloudConnectionStorage }); } - loadAll(): Promise { - return (this.loadAllPromise ??= - this._loadAndNormalizeClusterDescriptionInfo()); + async loadAll(): Promise { + try { + return (this.loadAllPromise ??= + this._loadAndNormalizeClusterDescriptionInfo()); + } finally { + delete this.loadAllPromise; + } } } diff --git a/packages/compass-web/webpack.config.js b/packages/compass-web/webpack.config.js index d3e85b9c50b..d16c68303f5 100644 --- a/packages/compass-web/webpack.config.js +++ b/packages/compass-web/webpack.config.js @@ -180,6 +180,14 @@ module.exports = async (env, args) => { tls: localPolyfill('tls'), }, }, + plugins: [ + new webpack.DefinePlugin({ + // Matches the electron-proxy.js default value + 'process.env.COMPASS_WEB_HTTP_PROXY_CLOUD_CONFIG': JSON.stringify( + process.env.COMPASS_WEB_HTTP_PROXY_CLOUD_CONFIG ?? 'dev' + ), + }), + ], }); }