Skip to content

Commit

Permalink
Merge pull request #2124 from HubSpot/scale-mismatch
Browse files Browse the repository at this point in the history
Fix updated request instance count
  • Loading branch information
pschoenfelder authored Jul 28, 2020
2 parents da1b9bb + feb0adb commit 7027849
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,11 @@ const RequestAlerts = ({requestId, requestAPI, bounces, activeTasksForRequest, d
const { pendingDeploy, activeDeploy } = requestParent;
if (pendingDeploy) {
const deployingInstanceCount = Utils.request.deployingInstanceCount(requestParent, activeTasksForRequest.data);
const { pendingDeployState } = requestParent;

let instances = requestParent.request.instances;
if (pendingDeploy.updatedRequest && pendingDeploy.updatedRequest.instances) {
instances = pendingDeploy.updatedRequest.instances
if (pendingDeployState.updatedRequest && pendingDeployState.updatedRequest.instances) {
instances = pendingDeployState.updatedRequest.instances
}
const pendingDeployProgress = (
<span>{`${deployingInstanceCount} of ${instances} new tasks are currently running`}</span>
Expand All @@ -49,7 +51,6 @@ const RequestAlerts = ({requestId, requestAPI, bounces, activeTasksForRequest, d
let maybeDeployProgress;
let maybeAdvanceDeploy;

const { pendingDeployState } = requestParent;
if (pendingDeployState && pendingDeployState.deployProgress) {
const { deployProgress, deployMarker } = pendingDeployState;
const {
Expand Down Expand Up @@ -90,7 +91,7 @@ const RequestAlerts = ({requestId, requestAPI, bounces, activeTasksForRequest, d
maybeDeployProgress = (
<span>
{
`Trying to deploy ${targetActiveInstances}
`Current deploy step trying to deploy ${targetActiveInstances} of ${instances}
instances, ${deployingInstanceCount} of
${targetActiveInstances} new tasks are currently running.`
}
Expand Down

0 comments on commit 7027849

Please # to comment.