Skip to content

Commit 672ee1c

Browse files
authored
feat(cli): stabilize --telemetry-file option (#988)
`--telemetry-file` option no longer needs to be included with `--unstable=telemetry`. --- By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license
1 parent 82fb0f3 commit 672ee1c

File tree

5 files changed

+3
-26
lines changed

5 files changed

+3
-26
lines changed

packages/@aws-cdk-testing/cli-integ/lib/with-cdk-app.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -420,7 +420,7 @@ export class TestFixture extends ShellHelper {
420420
// use events because bar renders bad in tests
421421
'--progress', 'events',
422422
...(skipStackRename ? stackNames : this.fullStackName(stackNames)),
423-
...(options.telemetryFile ? ['--unstable=telemetry', `--telemetry-file=${options.telemetryFile}`] : []),
423+
...(options.telemetryFile ? [`--telemetry-file=${options.telemetryFile}`] : []),
424424
];
425425
}
426426

packages/@aws-cdk-testing/cli-integ/tests/cli-integ-tests/cli-telemetry/cdk-cli-telemetry-send-to-file-unstable.integtest.ts

Lines changed: 0 additions & 19 deletions
This file was deleted.

packages/@aws-cdk-testing/cli-integ/tests/telemetry-integ-tests/cdk-synth-telemetry-with-errors.integtest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ integTest(
99
'cdk synth with telemetry and validation error leads to invoke failure',
1010
withDefaultFixture(async (fixture) => {
1111
const telemetryFile = path.join(fixture.integTestDir, `telemetry-${Date.now()}.json`);
12-
const output = await fixture.cdk(['synth', '--unstable=telemetry', `--telemetry-file=${telemetryFile}`], {
12+
const output = await fixture.cdk(['synth', `--telemetry-file=${telemetryFile}`], {
1313
allowErrExit: true,
1414
modEnv: {
1515
INTEG_STACK_SET: 'stage-with-errors',

packages/@aws-cdk-testing/cli-integ/tests/telemetry-integ-tests/cdk-synth-telemetry.integtest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ integTest(
1111
const telemetryFile = path.join(fixture.integTestDir, `telemetry-${Date.now()}.json`);
1212

1313
const synthOutput = await fixture.cdk(
14-
['synth', fixture.fullStackName('test-1'), '--unstable=telemetry', `--telemetry-file=${telemetryFile}`],
14+
['synth', fixture.fullStackName('test-1'), `--telemetry-file=${telemetryFile}`],
1515
{ modEnv: { TELEMETRY_ENDPOINT: TELEMETRY_ENDPOINT }, verboseLevel: 3 }, // trace mode
1616
);
1717

packages/aws-cdk/lib/cli/cli.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,10 +100,6 @@ export async function exec(args: string[], synthesizer?: Synthesizer): Promise<n
100100
caBundlePath: configuration.settings.get(['caBundlePath']),
101101
});
102102

103-
if (argv['telemetry-file'] && !configuration.settings.get(['unstable']).includes('telemetry')) {
104-
throw new ToolkitError('Unstable feature use: \'telemetry-file\' is unstable. It must be opted in via \'--unstable\', e.g. \'cdk deploy --unstable=telemetry --telemetry-file=my/file/path\'');
105-
}
106-
107103
try {
108104
await ioHost.startTelemetry(argv, configuration.context);
109105
} catch (e: any) {

0 commit comments

Comments
 (0)