Skip to content

Commit

Permalink
Merge pull request #65 from criticalmanufacturing/main-87279-anErrorO…
Browse files Browse the repository at this point in the history
…ccursWhileTryngToTerminateVersions

87279 - An Error Occurs While Trying to Terminate an Environment Version
  • Loading branch information
ritanorinho authored Dec 22, 2023
2 parents 43b69c8 + 4e58130 commit 2de53a7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
15 changes: 10 additions & 5 deletions src/Common/Handlers/NewEnvironmentHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,13 +127,18 @@ bool terminateOtherVersionsRemoveVolumes
terminateOperationAttibutes.Add(attributeRemove);
terminateOperationAttibutes.Add(attributeRemoveVolumes);
}
if (customerEnvironmentsToTerminate.Count > 0)
{
await _customerPortalClient.TerminateObjects<List<CustomerEnvironment>, CustomerEnvironment>(customerEnvironmentsToTerminate, terminateOperationAttibutes);

await _customerPortalClient.TerminateObjects<List<CustomerEnvironment>, CustomerEnvironment>(customerEnvironmentsToTerminate, terminateOperationAttibutes);

// wait until they're terminated
await _environmentDeploymentHandler.WaitForEnvironmentsToBeTerminated(customerEnvironmentsToTerminate);
// wait until they're terminated
await _environmentDeploymentHandler.WaitForEnvironmentsToBeTerminated(customerEnvironmentsToTerminate);

Session.LogInformation("Other versions terminated!");
Session.LogInformation("Other versions terminated!");
} else
{
Session.LogInformation("There are no versions with an eligible status to be terminated.");
}
}
}
// if not, check if we are creating a new environment for an infrastructure
Expand Down
2 changes: 1 addition & 1 deletion src/Version.props
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<Project>
<PropertyGroup>
<Version>1.13.7</Version>
<Version>1.13.8</Version>
</PropertyGroup>
</Project>

0 comments on commit 2de53a7

Please sign in to comment.