perf(ffe): fix FEATURE_FLAGGING_AND_EXPERIMENTATION CI regression on Node.js - #7488
Draft
rochdev wants to merge 3 commits into
Draft
perf(ffe): fix FEATURE_FLAGGING_AND_EXPERIMENTATION CI regression on Node.js#7488rochdev wants to merge 3 commits into
rochdev wants to merge 3 commits into
Conversation
…imer FEATURE_FLAGGING_AND_EXPERIMENTATION regressed to 7+ minutes in CI. test_exposures.py's wait_for_exposure_event/wait_for_min_exposure_count helpers were polling for up to 30s waiting on the exposures writer's periodic flush. Force an immediate flush via the existing /flush endpoint (already wired to a ffe:writers:flush diagnostics channel in dd-trace-js) before polling, so events land immediately instead of on the writer's timer. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Contributor
|
|
|
…tricted-require
express/fastify's eslint config bans require('diagnostics_channel')
via n/no-restricted-require. The node: prefixed specifier resolves to
the same core module and isn't covered by the restriction.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…iming out These tests were still executing under xfail (missing_feature maps to xfail, not skip), so each one burned its full wait_for timeout (~30s) waiting for an event that can never arrive on libraries without the feature. @slow pairs with the manifest's declaration marker to convert those to an unconditional skip, which is a no-op once a library implements the feature and the manifest entry is removed. Co-Authored-By: Claude Sonnet 5 <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.
Summary
FEATURE_FLAGGING_AND_EXPERIMENTATIONregressed from <3 minutes to 7+ minutes in dd-trace-js CI (nodejs express4 shard).1. Exposures: waiting on a periodic flush timer instead of flushing immediately
tests/ffe/test_exposures.py'swait_for_exposure_event/wait_for_min_exposure_counthelpers were purely pollinginterfaces.agent.wait_for(..., timeout=30)for exposure events, at the mercy of the exposures writer's periodic flush interval.weblog.get("/flush")call before polling, so the weblog forces its exposures writer to flush immediately via the existing/flushendpoint pattern, instead of waiting on the timer.express,express4-typescript,fastify,nextjs) now publish theffe:writers:flushdiagnostics channel (already consumed inside dd-trace-js) from their/flushhandlers.weblog.get("/flush")is a no-op for weblogs/languages that don't implement the route, so this is safe across all libraries.test_exposures.pynow completes in ~30s instead of stalling on the writer's timer.2. EVP flagevaluation:
missing_featuretests were still executing underxfail, burning their full timeoutmissing_feature(andbug, etc.) map topytest.mark.xfail, notskip(utils/_decorators.py) — the test body still runs. dd-trace-js has no implementation of/api/v2/flagevaluationat all, sotests/ffe/test_flag_eval_evp.py's 8 non-@scenario_crashclasses each ran to completion and burned their full 30swait_fortimeout before failing as expected. That's ~240s, the actual dominant cost of the scenario.@slow(existingskip_if_xfailmechanism, already used on 3 sibling classes in this file via@scenario_crash) to the remaining 8 classes.@slowonly converts a test to a hard skip when it's paired with the manifest'sdeclarationmarker for the current library — so this only skips for libraries where the feature is currently declared missing (today: Node.js for all 8, plus golang for the 3ObserveFullData_*classes it doesn't yet implement).@slowbecomes a no-op and the test runs for real. Confirmed against golang's actual CI timing (the one library that implements this today) that real event delivery is on the order of 1-2s, nowhere near the 30s ceiling, so no added flakiness risk anywhere.Test plan
FEATURE_FLAGGING_AND_EXPERIMENTATIONscenario for nodejs (express4/express4-typescript/fastify/nextjs) in CI and confirm it completes well under 3 minutes.tests/ffe/test_exposures.pystill passes for nodejs.tests/ffe/test_flag_eval_evp.pystill passes for golang (only the 3ObserveFullData_*classes should skip there).🤖 Generated with Claude Code