Skip to content

chore: add e2e cdk lambda fixture - #626

Merged
ava-silver merged 8 commits into
mainfrom
ava.silver/chore/add-e2e-cdk-lambda-fixture
Nov 16, 2026
Merged

ava-silver merged 8 commits into
mainfrom
ava.silver/chore/add-e2e-cdk-lambda-fixture

Conversation

@ava-silver

@ava-silver ava-silver commented Jun 26, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

Adds the CDK app that the Lambda E2E suite (#627) deploys:

e2e/lambda/
├── app.ts            # one stack, one Node.js function; E2E_INSTRUMENT toggles DatadogLambda
├── config.ts         # env, version, site, runtime
└── handler/index.mjs # logs a line and returns 200
  • The baseline deploy has no Datadog configuration. The instrumented deploy applies DatadogLambda with the construct's default Node and extension layer versions.
  • The function reads its Datadog API key from a Secrets Manager secret, passed with apiKeySecret so the construct grants read access to the exact ARN.
  • The stack carries the one_e2e_created and one_e2e_run_id tags, so the shared sweeper can find and delete leaked stacks.
  • The layout matches e2e/ecs-fargate/.

Motivation

First half of SVLS-10087. The lifecycle test and workflow are in #627.

Testing Guidelines

Before: No Lambda workload exists for an E2E suite to deploy.
After: The E2E run on #627 deployed this app with and without the construct, verified the instrumented configuration and telemetry, and destroyed it.

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog

ava-silver commented Jun 26, 2026 •

Copy link
Copy Markdown
Collaborator Author

@ava-silver
ava-silver marked this pull request as ready for review June 26, 2026 21:54
@ava-silver
ava-silver requested a review from a team as a code owner June 26, 2026 21:54
@ava-silver
ava-silver force-pushed the ava.silver/chore/add-e2e-cdk-lambda-fixture branch from f0c6f88 to 95acad5 Compare June 29, 2026 17:34
Base automatically changed from ava.silver/chore/add-synced-e2e-shared-helpers to main June 29, 2026 18:20
@ava-silver
ava-silver force-pushed the ava.silver/chore/add-e2e-cdk-lambda-fixture branch from 95acad5 to eefe03a Compare August 6, 2026 19:06
@ava-silver
ava-silver force-pushed the ava.silver/chore/add-e2e-cdk-lambda-fixture branch from eefe03a to a22a825 Compare August 17, 2026 20:59
@ava-silver
ava-silver force-pushed the ava.silver/chore/add-e2e-cdk-lambda-fixture branch from a22a825 to 378f072 Compare November 13, 2026 22:31
Comment thread e2e/lambda/app.ts
// (E2E_INSTRUMENT=false), then again with DatadogLambda applied to the same function. REMOVE is
// `cdk destroy` of the stack.
const instrument = process.env.E2E_INSTRUMENT === "true";
const serviceName = requireEnv("E2E_SERVICE_NAME");

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the service name static or does it end up including something like the run ID? If it is static you may want to not name the lambda function and let CFN handling the exact naming by adding its own suffix

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It includes the run ID -- it's one-e2e-cdk-lambda-<runId>, where the run ID is random per run, so runs don't collide. Keeping an explicit name is intentional:

  • The shared sweeper finds leaked functions and log groups by the one-e2e- prefix, so a CFN-generated name wouldn't get cleaned up.
  • The verifier, invoke, and cleanup checks look the function up by name.

@ava-silver
ava-silver merged commit 91fa6ee into main Nov 16, 2026
10 of 11 checks passed
@ava-silver
ava-silver deleted the ava.silver/chore/add-e2e-cdk-lambda-fixture branch November 16, 2026 16:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants