Skip to content

Commit a09563d

Browse files
lym953claude
andcommitted
chore: remove durable integration tests (moved to separate branch)
Integration tests for durable function log decoration moved to yiming.luo/durable-integ-tests to be merged in a separate PR. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 02bae89 commit a09563d

11 files changed

Lines changed: 6 additions & 279 deletions

File tree

.gitlab/datasources/test-suites.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,3 @@ test_suites:
33
- name: otlp
44
- name: snapstart
55
- name: lmi
6-
- name: durable

integration-tests/bin/app.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#!/usr/bin/env node
22
import 'source-map-support/register';
33
import * as cdk from 'aws-cdk-lib';
4-
import {Durable} from '../lib/stacks/durable';
54
import {OnDemand} from '../lib/stacks/on-demand';
65
import {Otlp} from '../lib/stacks/otlp';
76
import {Snapstart} from '../lib/stacks/snapstart';
@@ -26,9 +25,6 @@ const stacks = [
2625
new OnDemand(app, `integ-${identifier}-on-demand`, {
2726
env,
2827
}),
29-
new Durable(app, `integ-${identifier}-durable`, {
30-
env,
31-
}),
3228
new Otlp(app, `integ-${identifier}-otlp`, {
3329
env,
3430
}),

integration-tests/lambda/durable-python/lambda_durable_function.py

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

integration-tests/lambda/durable-python/lambda_non_durable_function.py

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

integration-tests/lambda/durable-python/requirements.txt

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

integration-tests/lib/stacks/durable.ts

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

integration-tests/lib/util.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ import * as lambda from 'aws-cdk-lib/aws-lambda';
66
import { LayerVersion } from "aws-cdk-lib/aws-lambda";
77
import {ACCOUNT, REGION} from "../config";
88

9-
export const datadogSecretArn = process.env.DATADOG_API_SECRET_ARN!;
9+
export const datadogSecretArn = 'arn:aws:secretsmanager:us-east-1:425362996713:secret:extension-integration-tests-api-key-PnEPHz';
1010
export const extensionLayerArn = process.env.EXTENSION_LAYER_ARN!;
1111

1212
export const defaultNodeRuntime = lambda.Runtime.NODEJS_24_X;
13-
export const defaultPythonRuntime = lambda.Runtime.PYTHON_3_14;
13+
export const defaultPythonRuntime = lambda.Runtime.PYTHON_3_13;
1414
export const defaultJavaRuntime = lambda.Runtime.JAVA_21;
1515
export const defaultDotnetRuntime = lambda.Runtime.DOTNET_8;
1616

1717
export const defaultNodeLayerArn = process.env.NODE_TRACER_LAYER_ARN || 'arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Node24-x:132';
18-
export const defaultPythonLayerArn = process.env.PYTHON_TRACER_LAYER_ARN || 'arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python314-ARM:123';
18+
export const defaultPythonLayerArn = process.env.PYTHON_TRACER_LAYER_ARN || 'arn:aws:lambda:us-east-1:464622532012:layer:Datadog-Python313-ARM:117';
1919
export const defaultJavaLayerArn = process.env.JAVA_TRACER_LAYER_ARN || 'arn:aws:lambda:us-east-1:464622532012:layer:dd-trace-java:25';
2020
export const defaultDotnetLayerArn = process.env.DOTNET_TRACER_LAYER_ARN || 'arn:aws:lambda:us-east-1:464622532012:layer:dd-trace-dotnet-ARM:23';
2121

integration-tests/tests/durable.test.ts

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

integration-tests/tests/utils/datadog.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,14 +227,12 @@ export async function getTraces(
227227
*/
228228
export async function getLogs(
229229
serviceName: string,
230-
requestId?: string,
230+
requestId: string,
231231
): Promise<DatadogLog[]> {
232232
const now = Date.now();
233233
const fromTime = now - (2 * 60 * 60 * 1000);
234234
const toTime = now;
235-
const query = requestId
236-
? `service:${serviceName} @lambda.request_id:${requestId}`
237-
: `service:${serviceName}`;
235+
const query = `service:${serviceName} @lambda.request_id:${requestId}`;
238236

239237
try {
240238
console.log(`Searching for logs: ${query}`);

integration-tests/tests/utils/lambda.ts

Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,7 @@ function formatLambdaError(error: unknown): string {
3636
export interface InvocationResult {
3737
functionName: string;
3838
requestId: string;
39-
// Lambda execution request ID extracted from tail logs (START RequestId: ...).
40-
// Undefined for durable functions because they do not support LogType=Tail.
41-
executionRequestId?: string;
42-
statusCode: number;
39+
statusCode?: number;
4340
}
4441

4542
export async function invokeLambda(
@@ -49,39 +46,21 @@ export async function invokeLambda(
4946
const command = new InvokeCommand({
5047
FunctionName: functionName,
5148
Payload: JSON.stringify(payload),
52-
LogType: 'Tail',
5349
});
5450

5551
let response;
5652
try {
5753
response = await lambdaClient.send(command);
58-
console.log(`Lambda invocation completed. StatusCode: ${response.StatusCode}, FunctionError: ${response.FunctionError || 'none'}`);
5954
} catch (error: unknown) {
6055
console.error(`Lambda invocation failed for '${functionName}': ${formatLambdaError(error)}`);
6156
throw error;
6257
}
6358

6459
const requestId: string = response.$metadata.requestId || '';
6560

66-
// For durable functions, $metadata.requestId is the HTTP orchestration request ID which
67-
// does NOT match the Lambda execution request ID stored as @lambda.request_id in Datadog.
68-
// Durable functions also do not support LogType=Tail, so LogResult is absent.
69-
// When LogResult is available, extract the real execution request ID from the START line.
70-
let executionRequestId: string | undefined;
71-
if (response.LogResult) {
72-
const decodedLogs = Buffer.from(response.LogResult, 'base64').toString('utf-8');
73-
console.log(`Tail logs: ${decodedLogs}`);
74-
const startMatch = decodedLogs.match(/START RequestId: ([a-f0-9-]+)/);
75-
if (startMatch?.[1]) {
76-
executionRequestId = startMatch[1];
77-
console.log(`Extracted execution requestId from tail logs: ${executionRequestId}`);
78-
}
79-
}
80-
8161
return {
8262
functionName,
8363
requestId,
84-
executionRequestId,
8564
statusCode: response.StatusCode || 200,
8665
};
8766
}

0 commit comments

Comments
 (0)