Skip to content

Commit

Permalink
fix: fix ECS service replacement regression
Browse files Browse the repository at this point in the history
The behavior introduced in #22467 was too eager, changing the no-feature
flag behavior for all services, not just services with a circuit breaker.
  • Loading branch information
rix0rrr committed Nov 18, 2022
1 parent 2c61405 commit beb695c
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions packages/@aws-cdk/aws-ecs/lib/base/base-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,16 @@ export abstract class BaseService extends Resource
const disableCircuitBreakerEcsDeploymentControllerFeatureFlag =
FeatureFlags.of(this).isEnabled(cxapi.ECS_DISABLE_EXPLICIT_DEPLOYMENT_CONTROLLER_FOR_CIRCUIT_BREAKER);

return disableCircuitBreakerEcsDeploymentControllerFeatureFlag ? undefined : {
type: DeploymentControllerType.ECS,
};
if (!disableCircuitBreakerEcsDeploymentControllerFeatureFlag && props.circuitBreaker) {
// This is undesirable behavior (the controller is implicitly ECS anyway when left
// undefined, so specifying it is not necessary but DOES trigger a CFN replacement)
// but we leave it in for backwards compat.
return {
type: DeploymentControllerType.ECS,
};
}

return undefined;
}

private executeCommandLogConfiguration() {
Expand Down

0 comments on commit beb695c

Please sign in to comment.