test(oom): bump python OOM function to 512 MB to fix flaky metric assertion#1306
Open
lym953 wants to merge 2 commits into
Open
test(oom): bump python OOM function to 512 MB to fix flaky metric assertion#1306lym953 wants to merge 2 commits into
lym953 wants to merge 2 commits into
Conversation
…ertion The `integration-suite: [oom]` python case failed ~1 run in 3 with `out_of_memory` count 0 (all other runtimes passing). Datadog logs show the python function emitted no telemetry at all on failing runs — no logs and no metric — while the same function emits both on passing runs. At 256 MB the python3.13 runtime plus the `datadog_lambda` handler shim leave too little headroom, so when the function OOMs the kernel OOM-killer intermittently takes the extension too before it can run its end-of-invocation flush, dropping both logs and the enhanced metric. Bumping the python function to 512 MB keeps the extension alive to detect and flush. Detection paths are unchanged: the function still hits its memory cap and emits `MemoryError`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
litianningdatadog
approved these changes
Jul 15, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR reduces flakiness in the integration-suite: [oom] integration test by increasing memory for the Python OOM test Lambda so the Datadog extension is less likely to be OOM-killed before it can flush telemetry/metrics.
Changes:
- Introduces a dedicated
pythonOomMemorySize(512 MB) while keeping the default OOM test memory size at 256 MB for other runtimes. - Updates inline rationale comments explaining why Python needs additional headroom.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
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.
Overview
The
integration-suite: [oom]job flakes (~1 run in 3) on the python case only:out_of_memorycount comes back0while every other runtime reports1. It fails across unrelated branches, so it's a pre-existing flake, not a regression.Datadog logs show the python function emits no telemetry at all on failing runs (no logs, no metric), but emits both on passing runs. At 256 MB the
python3.13runtime plus thedatadog_lambdashim leave too little headroom, so when the function OOMs the kernel OOM-killer intermittently takes the extension too (Extension.Crash) before its end-of-invocation flush, dropping both logs and the metric.Fix. Bump the python OOM function to 512 MB so the extension survives and flushes. Detection paths are unchanged (the function still hits its memory cap and emits
MemoryError); other runtimes stay at 256 MB.Testing
tsc --noEmitpasses.oomruns (the failure is a ~1-in-3 race); 512 MB roughly doubles the headroom, and every other runtime already passes reliably at 256 MB.