Repository navigation
test(integration): add failure-accounting suite for timeout/crash enhanced metrics - #1454
DarcyRaynerDD wants to merge 3 commits into
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
❌ ErrorsYour PR has failed checks. Please review the issues below and take necessary action before merging. 🚦 1 Pipeline job failed
Useful? React with 👍 / 👎 This comment will be updated automatically if new data arrives.🔗 Commit SHA: a086bc4 | Docs | View more details | Give us feedback! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a2bb33adb0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| - name: payload-size-e2e | ||
| - name: dsm | ||
| - name: durable-cold-start | ||
| - name: failure-accounting |
There was a problem hiding this comment.
Keep the known-flaky suite out of the blocking matrix
When the current default flush strategy loses a timeout/error metric—the race this test is explicitly intended to reproduce—the exact-count assertions fail, yet .gitlab/templates/pipeline.yaml.tpl makes every suite except payload-size-e2e blocking. Adding this entry therefore makes unrelated pipelines intermittently fail on the pre-fix implementation; retry: 2 only reduces or hides the failure rather than making the suite reliable. Enable the matrix entry only together with the extension fix, or otherwise keep it non-blocking until that fix lands.
Useful? React with 👍 / 👎.
…anced metrics Invokes a Node function 310 times sequentially with a timeout or crash every 50th invocation, under both the Default and End flush strategies, and asserts aws.lambda.enhanced.invocations/errors/timeouts match the Invoke responses. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ble debug logs The first CI run lost one timeout's errors/timeouts counts on the default-strategy function in one of two attempts, so the loss is a race. More resets per run make it more likely to show up, and debug logs show when runtimeDone reaches the extension relative to shutdown. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ix lands The suite reproduces a race that the current extension loses intermittently, so registering it before the fix would make unrelated pipelines flaky. The fix PR registers it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
a2bb33a to
a086bc4
Compare
|
@DataDog review |
There was a problem hiding this comment.
Overview
Adds a
failure-accountingintegration suite that checks whetheraws.lambda.enhanced.invocations,errorsandtimeoutsmatch what Lambda reports when a function times out or crashes under steady load.No existing suite covered timeouts or busy functions. The extension's Default flush strategy switches from flushing at the end of each invocation to periodic flushing after about 20 invocations in one environment. A timeout or crash resets the environment, so the suite spaces failures 30 invocations apart. That way each fresh environment has switched to periodic flushing before the next failure.
endas a control. Both have reserved concurrency 1 so the invocations share one environment at a time.process.exit(1), alternating, for 12 failures: 6 timeouts and 6 crashes.FunctionError, andSandbox.Timedoutfor timeouts).DD_LOG_LEVEL=debug) are on for the Default function, so a lost count can be traced in the extension logs.This suite fails intermittently on
maintoday. The first CI run (6 failures per attempt, extension built from522d3ff) showed:endstrategy (control)platform.runtimeDonebeing dropped at shutdown.endcontrol counted everything.The fix is in #1455, stacked on this PR. This PR doesn't add the suite to the CI matrix (
.gitlab/datasources/test-suites.yaml), so it can merge without makingmainflaky. #1455 registers the suite alongside the fix. The integration jobs useretry: 2, which can hide a failed attempt, so on #1455 check every attempt of this suite, not just the final status.Testing
npx tsc --noEmit -p .and a CDK synth of the stack pass.a2bb33a.🤖 Generated with Claude Code