From e45fcaea6b0b95825465c4ba0ed61d8f80d3a0b8 Mon Sep 17 00:00:00 2001 From: Momo Kornher Date: Mon, 16 Dec 2024 16:19:22 +0000 Subject: [PATCH] chore(cli): remove CDK_INTEG_MODE hack (#32539) This hack was used to support the previous integration test system for the monorepo. It was never publicly advertised and is not used in our setup anymore. We are removing the unused code to simplify toolkit code. ### Reason for this change Cleaning up unused code. ### Description of changes Removed the unused code block. ### Description of how you validated changes Searched our repo and public GitHub for any usage. Only comes up in forks of the AWS CDK. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license* --- packages/aws-cdk/lib/cdk-toolkit.ts | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/packages/aws-cdk/lib/cdk-toolkit.ts b/packages/aws-cdk/lib/cdk-toolkit.ts index 15fab3fe5dfe3..9eb2b24c473ef 100644 --- a/packages/aws-cdk/lib/cdk-toolkit.ts +++ b/packages/aws-cdk/lib/cdk-toolkit.ts @@ -904,21 +904,6 @@ export class CdkToolkit { return undefined; } - // This is a slight hack; in integ mode we allow multiple stacks to be synthesized to stdout sequentially. - // This is to make it so that we can support multi-stack integ test expectations, without so drastically - // having to change the synthesis format that we have to rerun all integ tests. - // - // Because this feature is not useful to consumers (the output is missing - // the stack names), it's not exposed as a CLI flag. Instead, it's hidden - // behind an environment variable. - const isIntegMode = process.env.CDK_INTEG_MODE === '1'; - if (isIntegMode) { - printSerializedObject( - stacks.stackArtifacts.map((s) => obscureTemplate(s.template)), - json ?? false, - ); - } - // not outputting template to stdout, let's explain things to the user a little bit... success(`Successfully synthesized to ${chalk.blue(path.resolve(stacks.assembly.directory))}`); print(