diff --git a/Control/lib/services/Environment.service.js b/Control/lib/services/Environment.service.js index 18e8463c6..405f08718 100644 --- a/Control/lib/services/Environment.service.js +++ b/Control/lib/services/Environment.service.js @@ -71,10 +71,6 @@ class EnvironmentService { throw grpcErrorToNativeError(error); } try { - if (!environments || environments.length === 0) { - this._broadcastService.broadcast(ENVIRONMENTS_OVERVIEW, []); - return []; - } const activeEnvironmentList = []; for (const { id } of environments) { let environment; diff --git a/Control/lib/services/environment/EnvironmentCache.service.js b/Control/lib/services/environment/EnvironmentCache.service.js index 8320f8a59..e09a7413b 100644 --- a/Control/lib/services/environment/EnvironmentCache.service.js +++ b/Control/lib/services/environment/EnvironmentCache.service.js @@ -252,14 +252,17 @@ class EnvironmentCacheService { if (!cachedEnvironment.rootRole) { cachedEnvironment.rootRole = environmentEvent.workflowTemplateInfoName; } - this._environments.set(id, cachedEnvironment); + + this.addOrUpdateEnvironment(cachedEnvironment, false); if ( transition?.name === EnvironmentTransitionType.DESTROY && state === EnvironmentState.DONE && - message === ECS_DESTROY_TRANSITION_DONE_MESSAGE + message === ECS_DESTROY_TRANSITION_DONE_MESSAGE && + !cachedEnvironment.deploymentError ) { // That is, if the environment successfully ended the DESTROY transition + // while not having a deployment error this.removeEnvironmentById(id); } diff --git a/Control/package-lock.json b/Control/package-lock.json index f64c3798c..00706ad0b 100644 --- a/Control/package-lock.json +++ b/Control/package-lock.json @@ -1,12 +1,12 @@ { "name": "@aliceo2/control", - "version": "2.0.0", + "version": "2.0.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@aliceo2/control", - "version": "2.0.0", + "version": "2.0.1", "bundleDependencies": [ "@aliceo2/web-ui", "@grpc/grpc-js", diff --git a/Control/package.json b/Control/package.json index 51e0d2a10..eecefac80 100644 --- a/Control/package.json +++ b/Control/package.json @@ -1,6 +1,6 @@ { "name": "@aliceo2/control", - "version": "2.0.0", + "version": "2.0.1", "description": "ALICE O2 Control GUI", "author": "George Raduta", "contributors": [