chore: add e2e lifecycle test and workflow#710
Draft
ava-silver wants to merge 1 commit into
Draft
Conversation
10 tasks
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
10 tasks
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## ava.silver/chore/add-e2e-lambda-fixture #710 +/- ##
========================================================================
Coverage 77.69% 77.69%
========================================================================
Files 12 12
Lines 1112 1112
Branches 350 350
========================================================================
Hits 864 864
Misses 118 118
Partials 130 130 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
aa00789 to
09bfcd7
Compare
7488413 to
26daf29
Compare
09bfcd7 to
d8d9b06
Compare
26daf29 to
0c280ce
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What does this PR do?
Adds the end-to-end instrumentation lifecycle test for
serverless-plugin-datadogon AWS Lambda, plus its harness, README, and CI workflow.lambda.test.tsdrives a Serverless Framework fixture through the full contract:sls deploy; the plugin instruments the function. Assert config present (pinned Datadog Node + extension layers, redirected handler,DD_*env, identifying tags).lambda invoke, then poll the Datadog API until spans and logs carrying the run identity (service/env/version/run id) appear.sls remove; assert the function no longer exists.Provision and APPLY coincide here -- the plugin runs as part of
sls deploy, so there's no separate uninstrumented baseline.helpers/e2e.config.tsholds the repo-specific bits: naming, retry patterns, expected layer ARNs read from the plugin's ownsrc/layers.json, and the verifier contract.Infrastructure
The "tool under test" is the plugin itself, built from
srcandnpm pack'd into a tarball that's installed into the fixture -- not a published release -- so a failure blames the plugin.setup.shpacks and installs the plugin via a tarball rather than an npmfile:dep, which would recurse (the fixture lives under the repo root). The Datadog API key is passed inline throughserverless.ymland surfaces asDD_API_KEYon the function; CI mints it so the workload ships to the org the suite queries.sls deployprovisions the function through a CloudFormation stack; REMOVE/teardown issls remove, always.Motivation
Gives the plugin a real instrumentation lifecycle test against live AWS + Datadog, so a regression in layer pinning, handler redirect, env wiring, or telemetry flow fails CI.
Testing Guidelines
.github/workflows/e2e.ymlruns the suite behindsrc/**+e2e/**path filters. AWS creds come from OIDC, Datadog creds from dd-sts -- no long-lived secrets, and a missing credential fails loudly rather than skipping green.Ran the full suite end-to-end locally against the serverless sandbox -- all phases plus teardown pass.
Additional Notes
Layer/extension versions and the runtime are pinned (
src/layers.json, overridable via env) so failures blame the plugin, not an upstream bump.frameworkVersionis pinned to 3 to avoid the Serverless v4 login flow in CI.Types of changes
Check all that apply