Skip to content

‼️ cdk deploy --exclusively (-e) no longer working in 2.38.0 #21661

@mrdanp

Description

@mrdanp

Status: RESOLVED in 2.38.1

Overview:

The --exclusively flag does not work with the v2.38.0 release.

When the --exclusively flag is used to select stacks with
dependencies, instead no stacks are deployed at all and the
deployment silently no-ops.

Solution:

Upgrade to 2.38.1

Workaround:

Do not upgrade to 2.38.0, downgrade if necessary


Describe the bug

Upgraded to aws-cdk v 2.38.0 today and noticed that deploying with the --exclusively flag no longer works. My aws pipelines also stopped working since i was installing the latest cdk version in the buildspecs.

This is a command that works with v 2.37.1

cdk deploy StaticAssetDeploymentStack -e

However, after upgrading to 2.38.0, it stops automatically after the synthesis.

The logs show

Synthesis time: 3.53s

then nothing else.

If i remove the -e flags, it works as expected, but will of course deploy dependencies first.

Expected Behavior

the -e flag should deploy the stack without dependencies

Current Behavior

it stops automatically after synthesis and the stack is not deployed.

Reproduction Steps

this is a sample stack. But the issue is not unique to this stack. I have others that fail as well

import * as cdk from "aws-cdk-lib";
import * as path from "path";
import * as s3deploy from "aws-cdk-lib/aws-s3-deployment";

import { Bucket } from "aws-cdk-lib/aws-s3";
import { Construct } from "constructs";
import { Distribution } from "aws-cdk-lib/aws-cloudfront";

export interface StaticAssetDeploymentStackProps {
  staticAssetBucket: Bucket;
  distribution: Distribution;
  env:any;
}

export class StaticAssetDeploymentStack extends cdk.Stack {
  constructor(
    scope: Construct,
    id: string,
    props: StaticAssetDeploymentStackProps,
  ) {
    super(scope, id, props);

    new s3deploy.BucketDeployment(this, "deployWeb", {
      sources: [
        s3deploy.Source.asset(
          path.join(__dirname, "..", "testApp", "dist")
        ),
      ],
      destinationBucket: props.staticAssetBucket,
      distribution: props.distribution,
      distributionPaths: ["/*"],
      memoryLimit: 512,
    });
  }
}

Possible Solution

No response

Additional Information/Context

No response

CDK CLI Version

2.7.20

Framework Version

No response

Node.js Version

16.17.0

OS

macOs Monterey

Language

Typescript

Language Version

No response

Other information

No response

Metadata

Metadata

Assignees

Labels

@aws-cdk/aws-cloudfrontRelated to Amazon CloudFrontbugThis issue is a bug.management/trackingIssues that track a subject or multiple issuesp0

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions