Skip to content

Commit 190604e

Browse files
authored
Merge branch 'main' into hotswap-agentcore-runtime
2 parents 8b15d5a + 8ac049e commit 190604e

File tree

8 files changed

+12
-11
lines changed

8 files changed

+12
-11
lines changed

packages/@aws-cdk-testing/cli-integ/tests/telemetry-integ-tests/cdk-cli-telemetry-disable-sends-no-data.integtest.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
import { TELEMETRY_ENDPOINT } from './constants';
21
import { integTest, withDefaultFixture } from '../../lib';
32

43
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
54

65
integTest(
76
'CLI Telemetry --disable does not send to endpoint',
87
withDefaultFixture(async (fixture) => {
9-
const output = await fixture.cdk(['cli-telemetry', '--disable'], { verboseLevel: 3, modEnv: { TELEMETRY_ENDPOINT: TELEMETRY_ENDPOINT } });
8+
const output = await fixture.cdk(['cli-telemetry', '--disable'], { verboseLevel: 3 });
109

1110
// Check the trace that telemetry was not executed successfully
1211
expect(output).not.toContain('Telemetry Sent Successfully');

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

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

65
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
@@ -14,7 +13,6 @@ integTest(
1413
const deployOutput = await fixture.cdkDeploy('test-1', {
1514
telemetryFile,
1615
verboseLevel: 3, // trace mode
17-
modEnv: { TELEMETRY_ENDPOINT: TELEMETRY_ENDPOINT },
1816
});
1917

2018
// Check the trace that telemetry was executed successfully

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

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

65
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
@@ -13,7 +12,6 @@ integTest(
1312
allowErrExit: true,
1413
modEnv: {
1514
INTEG_STACK_SET: 'stage-with-errors',
16-
TELEMETRY_ENDPOINT: TELEMETRY_ENDPOINT,
1715
},
1816
verboseLevel: 3, // trace mode
1917
});

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

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

65
jest.setTimeout(2 * 60 * 60_000); // Includes the time to acquire locks, worst-case single-threaded runtime
@@ -12,7 +11,7 @@ integTest(
1211

1312
const synthOutput = await fixture.cdk(
1413
['synth', fixture.fullStackName('test-1'), `--telemetry-file=${telemetryFile}`],
15-
{ modEnv: { TELEMETRY_ENDPOINT: TELEMETRY_ENDPOINT }, verboseLevel: 3 }, // trace mode
14+
{ verboseLevel: 3 }, // trace mode
1615
);
1716

1817
// Check the trace that telemetry was executed successfully

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

Lines changed: 0 additions & 1 deletion
This file was deleted.

packages/@aws-cdk/integ-runner/lib/workers/common.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,11 @@ export enum DiagnosticReason {
191191
*/
192192
TEST_ERROR = 'TEST_ERROR',
193193

194+
/**
195+
* A non-failing warning from the integration test run
196+
*/
197+
TEST_WARNING = 'TEST_WARNING',
198+
194199
/**
195200
* The snapshot test failed because the actual
196201
* snapshot was different than the expected snapshot
@@ -294,6 +299,9 @@ export function printResults(diagnostic: Diagnostic): void {
294299
case DiagnosticReason.SNAPSHOT_FAILED:
295300
logger.error(' CHANGED %s %s\n%s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
296301
break;
302+
case DiagnosticReason.TEST_WARNING:
303+
logger.warning(' WARN %s %s\n%s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));
304+
break;
297305
case DiagnosticReason.SNAPSHOT_ERROR:
298306
case DiagnosticReason.TEST_ERROR:
299307
logger.error(' ERROR %s %s\n%s', diagnostic.testName, chalk.gray(`${diagnostic.duration}s`), indentLines(diagnostic.message, 6));

packages/@aws-cdk/integ-runner/lib/workers/extract/extract_worker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export async function snapshotTestWorker(testInfo: IntegTestInfo, options: Snaps
132132

133133
const timer = setTimeout(() => {
134134
workerpool.workerEmit({
135-
reason: DiagnosticReason.SNAPSHOT_ERROR,
135+
reason: DiagnosticReason.TEST_WARNING,
136136
testName: test.testName,
137137
message: 'Test is taking a very long time',
138138
duration: (Date.now() - start) / 1000,

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ export class CliIoHost implements IIoHost {
203203
}
204204
}
205205

206-
const telemetryEndpoint = process.env.TELEMETRY_ENDPOINT;
206+
const telemetryEndpoint = process.env.TELEMETRY_ENDPOINT ?? 'https://cdk-cli-telemetry.us-east-1.api.aws/metrics';
207207
if (canCollectTelemetry(args, context) && telemetryEndpoint) {
208208
try {
209209
sinks.push(new EndpointTelemetrySink({

0 commit comments

Comments
 (0)