Skip to content

Commit

Permalink
Update feature flag naming
Browse files Browse the repository at this point in the history
  • Loading branch information
GavinZZ committed May 15, 2024
1 parent b9449c0 commit bf6760d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-ecs/lib/base/base-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ export abstract class BaseService extends Resource
} else if ((!props.deploymentController ||
props.deploymentController?.type === DeploymentControllerType.ECS) && this.deploymentAlarmsAvailableInRegion()) {
// Only set default deployment alarms settings when feature flag is not enabled.
if (!FeatureFlags.of(this).isEnabled(cxapi.REMOVE_DEFAULT_DEPLOYMENT_ALARM)) {
if (!FeatureFlags.of(this).isEnabled(cxapi.ECS_REMOVE_DEFAULT_DEPLOYMENT_ALARM)) {
this.deploymentAlarms = {
alarmNames: [],
enable: false,
Expand Down
2 changes: 1 addition & 1 deletion packages/aws-cdk-lib/aws-ecs/test/base-service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ describe('For alarm-based rollbacks', () => {
}],
])('deploymentAlarms is (not set)/(set) by default for ECS deployment controller when feature flag is enabled/disabled', (flag, settings) => {
// GIVEN
const app = new cdk.App({ context: { [cxapi.REMOVE_DEFAULT_DEPLOYMENT_ALARM]: flag } });
const app = new cdk.App({ context: { [cxapi.ECS_REMOVE_DEFAULT_DEPLOYMENT_ALARM]: flag } });
stack = new cdk.Stack(app);
const vpc = new ec2.Vpc(stack, 'Vpc');
const cluster = new ecs.Cluster(stack, 'EcsCluster', { vpc });
Expand Down
4 changes: 2 additions & 2 deletions packages/aws-cdk-lib/cx-api/lib/features.ts
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ export const KMS_REDUCE_CROSS_ACCOUNT_REGION_POLICY_SCOPE = '@aws-cdk/aws-kms:re
export const PIPELINE_REDUCE_ASSET_ROLE_TRUST_SCOPE = '@aws-cdk/pipelines:reduceAssetRoleTrustScope';
export const EKS_NODEGROUP_NAME = '@aws-cdk/aws-eks:nodegroupNameAttribute';
export const EBS_DEFAULT_GP3 = '@aws-cdk/aws-ec2:ebsDefaultGp3Volume';
export const REMOVE_DEFAULT_DEPLOYMENT_ALARM = '@aws-cdk/aws-ecs:removeDefaultDeploymentAlarm';
export const ECS_REMOVE_DEFAULT_DEPLOYMENT_ALARM = '@aws-cdk/aws-ecs:removeDefaultDeploymentAlarm';

export const FLAGS: Record<string, FlagInfo> = {
//////////////////////////////////////////////////////////////////////
Expand Down Expand Up @@ -1078,7 +1078,7 @@ export const FLAGS: Record<string, FlagInfo> = {
},

//////////////////////////////////////////////////////////////////////
[REMOVE_DEFAULT_DEPLOYMENT_ALARM]: {
[ECS_REMOVE_DEFAULT_DEPLOYMENT_ALARM]: {
type: FlagType.ApiDefault,
summary: 'When enabled, remove default deployment alarm settings',
detailsMd: `
Expand Down

0 comments on commit bf6760d

Please sign in to comment.