Skip to content

Commit ba9a1e2

Browse files
committed
Merge branch 'main' of https://github.com/go-to-k/aws-cdk-cli into hotswap-agentcore-runtime
2 parents 04a97fb + af211ad commit ba9a1e2

File tree

36 files changed

+2441
-2437
lines changed

36 files changed

+2441
-2437
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/@aws-cdk-testing/cli-integ/package.json

Lines changed: 16 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import * as path from 'path';
2+
import * as fs from 'fs-extra';
3+
import { integTest, withDefaultFixture } from '../../lib';
4+
5+
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
6+
7+
integTest('no telemetry is collected if command is invalid', withDefaultFixture(async (fixture) => {
8+
const telemetryFile = path.join(fixture.integTestDir, `telemetry-${Date.now()}.json`);
9+
10+
const commandOutput = await fixture.cdk(['invalid-command', `--telemetry-file=${telemetryFile}`], { verboseLevel: 3, allowErrExit: true }); // trace mode
11+
12+
expect(commandOutput).toContain('Session instantiated with an invalid command');
13+
expect(fs.existsSync(telemetryFile)).toBeFalsy();
14+
}),
15+
);

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as path from 'path';
22
import * as fs from 'fs-extra';
3+
import { CURRENT_TELEMETRY_VERSION } from './constants';
34
import { integTest, withDefaultFixture } from '../../lib';
45

56
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
@@ -51,7 +52,7 @@ integTest(
5152
identifiers: expect.objectContaining({
5253
installationId: expect.anything(),
5354
sessionId: expect.anything(),
54-
telemetryVersion: '1.0',
55+
telemetryVersion: CURRENT_TELEMETRY_VERSION,
5556
cdkCliVersion: expect.anything(),
5657
cdkLibraryVersion: fixture.library.requestedVersion(),
5758
region: expect.anything(),
@@ -99,7 +100,7 @@ integTest(
99100
identifiers: expect.objectContaining({
100101
installationId: expect.anything(),
101102
sessionId: expect.anything(),
102-
telemetryVersion: '1.0',
103+
telemetryVersion: CURRENT_TELEMETRY_VERSION,
103104
cdkCliVersion: expect.anything(),
104105
cdkLibraryVersion: fixture.library.requestedVersion(),
105106
region: expect.anything(),

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import * as path from 'path';
22
import * as fs from 'fs-extra';
3+
import { CURRENT_TELEMETRY_VERSION } from './constants';
34
import { integTest, withDefaultFixture } from '../../lib';
45

56
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
@@ -48,7 +49,7 @@ integTest(
4849
identifiers: expect.objectContaining({
4950
installationId: expect.anything(),
5051
sessionId: expect.anything(),
51-
telemetryVersion: '1.0',
52+
telemetryVersion: CURRENT_TELEMETRY_VERSION,
5253
cdkCliVersion: expect.anything(),
5354
cdkLibraryVersion: fixture.library.requestedVersion(),
5455
region: expect.anything(),
@@ -96,7 +97,7 @@ integTest(
9697
identifiers: expect.objectContaining({
9798
installationId: expect.anything(),
9899
sessionId: expect.anything(),
99-
telemetryVersion: '1.0',
100+
telemetryVersion: CURRENT_TELEMETRY_VERSION,
100101
cdkCliVersion: expect.anything(),
101102
cdkLibraryVersion: fixture.library.requestedVersion(),
102103
region: expect.anything(),
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export const CURRENT_TELEMETRY_VERSION = '2.0';

packages/@aws-cdk/cloudformation-diff/package.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)