You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: gate GitLab gtest jobs on the flaky-test quarantine list - #977
What does this PR do?:
Wires the GitLab gtest jobs (gtest-{release,asan,tsan}-{amd64,arm64} in .gitlab/sanitizer-tests/.gitlab-ci.yml) into the flaky-test quarantine mechanism that the GitHub Actions Java jobs already use. Each gtest binary now runs with --gtest_output=xml: and a gate (gtest_quarantine_gate.py) applies ddprof-test/quarantine.txt to the results: a quarantined failure keeps reporting but does not fail the job; an un-quarantined failure, or a binary that exited non-zero without naming a test, fails it.
Motivation: PROF-16577: NativeThreadNameRaceTest.threadDyingBetweenScansIsNeverNamed fails ~daily on quiet gtest runners, and the gtest jobs had no quarantine escape hatch — the only lever was deleting the test or GTEST_SKIP() (shipped as an interim on PR #898). This closes the gap so C++ flakes are handled like Java flakes: tracked, ticketed, still reporting, not gating.
Additional Notes:
The gate reuses quarantine.find_entry() directly (single source of matching truth); it mirrors flake_report.py's verdict philosophy in a single-attempt shape: un-quarantined named failure → gate; all named failures quarantined → excused; non-zero exit with no named failure (crash, unreadable report) → gate, fail-closed.
The XML reports are only needed to excuse, never to pass: a failing test makes gtest exit non-zero on its own, so a broken report degrades to rc-based gating rather than silent green.
Cell naming: glibc-gtest-<config>-<arch> — the gtest binaries run under no target JDK, so the jdk slot names the runner kind; arch uses aarch64/amd64 per quarantine.py's KNOWN_ARCHES.
Behavior change in the runner loop: a failing binary no longer stops the remaining suites (they all run and report; the gate owns the verdict). The per-binary === name === headers, FAILED: <name> exited N lines, artifact paths, TSan GTEST_DEATH_TEST_STYLE and the arm64 sysctl are unchanged.
New quarantine entry for the PROF-16577 flake, scoped to glibc-gtest-*-amd64 (the only cells it has failed on); review_by 2027-02-09.
.github/scripts/tests/test_gtest_quarantine_gate.sh: 16 hermetic cases (gate verdicts, <error> parsing, rc-decides contract, dedup, empty-list refusal, and full-runner smokes via a stub binary: rc propagation, quarantine excuse, crash-without-report gating, non-executable-subset refusal).
quarantine.py validate, shellcheck run-gtests.sh, bash -n, copyright/CLAUDE.md/knowledgebase checks: all pass.
First live validation is the GitLab pipeline on this branch; the quarantine entry keeps NativeThreadNameRaceTest failures from gating gtest-release-amd64/gtest-tsan-amd64.
For Datadog employees:
If this PR touches code that signs or publishes builds or packages, or handles
credentials of any kind, I've requested a security review (run the dd:platform-security-review
skill, or file a request via the PSEC review form). bewaire also runs automatically on every PR.
Closing as superseded: #974 implements the same wiring (tracking ticket PROF-15902) through the full existing run_tests_with_retry.sh → flake_report.py machinery — retries, flake-vs-broken classification, signal-death and sanitizer-abort handling — with the jdk-less cell naming (glibc-<config>-<arch>) that this PR diverged from. The PROF-16577 quarantine entry for NativeThreadNameRaceTest lives there. Two review findings from this branch that #974 may still want to check against its own runner: capturing $? immediately after the run pipeline (an intervening assignment silently disables the empty-binary-set guard), and refusing to run when a matching gtest binary is non-executable (a skipped suite must not read as a complete passing run).
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
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?:
Wires the GitLab gtest jobs (
gtest-{release,asan,tsan}-{amd64,arm64}in.gitlab/sanitizer-tests/.gitlab-ci.yml) into the flaky-test quarantine mechanism that the GitHub Actions Java jobs already use. Each gtest binary now runs with--gtest_output=xml:and a gate (gtest_quarantine_gate.py) appliesddprof-test/quarantine.txtto the results: a quarantined failure keeps reporting but does not fail the job; an un-quarantined failure, or a binary that exited non-zero without naming a test, fails it.Motivation:
PROF-16577:
NativeThreadNameRaceTest.threadDyingBetweenScansIsNeverNamedfails ~daily on quiet gtest runners, and the gtest jobs had no quarantine escape hatch — the only lever was deleting the test orGTEST_SKIP()(shipped as an interim on PR #898). This closes the gap so C++ flakes are handled like Java flakes: tracked, ticketed, still reporting, not gating.Additional Notes:
quarantine.find_entry()directly (single source of matching truth); it mirrorsflake_report.py's verdict philosophy in a single-attempt shape: un-quarantined named failure → gate; all named failures quarantined → excused; non-zero exit with no named failure (crash, unreadable report) → gate, fail-closed.glibc-gtest-<config>-<arch>— the gtest binaries run under no target JDK, so the jdk slot names the runner kind; arch usesaarch64/amd64perquarantine.py'sKNOWN_ARCHES.=== name ===headers,FAILED: <name> exited Nlines, artifact paths, TSanGTEST_DEATH_TEST_STYLEand the arm64sysctlare unchanged.glibc-gtest-*-amd64(the only cells it has failed on);review_by2027-02-09.GTEST_SKIP(): the revert lands after Reference-chain cache: rebuild stale chains (improved path, correlation) instead of erasing them #898 merges (the skip does not exist onmainyet, so there is nothing to revert here).How to test the change?:
.github/scripts/tests/test_gtest_quarantine_gate.sh: 16 hermetic cases (gate verdicts,<error>parsing, rc-decides contract, dedup, empty-list refusal, and full-runner smokes via a stub binary: rc propagation, quarantine excuse, crash-without-report gating, non-executable-subset refusal).quarantine.py validate,shellcheck run-gtests.sh,bash -n, copyright/CLAUDE.md/knowledgebase checks: all pass.NativeThreadNameRaceTestfailures from gatinggtest-release-amd64/gtest-tsan-amd64.For Datadog employees:
credentials of any kind, I've requested a security review (run the
dd:platform-security-reviewskill, or file a request via the PSEC review form).
bewairealso runs automatically on every PR.