Skip to content

Report failed flaky tests as skip#11931

Open
PerfectSlayer wants to merge 3 commits into
masterfrom
bbujon/ci-results
Open

Report failed flaky tests as skip#11931
PerfectSlayer wants to merge 3 commits into
masterfrom
bbujon/ci-results

Conversation

@PerfectSlayer

@PerfectSlayer PerfectSlayer commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

What Does This Do

This PR updates the test result collector to mark the failed flaky tests as skip.

Motivation

Avoid reporting "failures" to the Test Optimization product.

Additional Notes

It additionally fixes a typo for the release notes tag documentation.

Contributor Checklist

Jira ticket: APMLP-1267

@PerfectSlayer PerfectSlayer requested review from a team as code owners July 13, 2026 17:00
@PerfectSlayer PerfectSlayer added the type: feature Enhancements and improvements label Jul 13, 2026
@PerfectSlayer PerfectSlayer requested review from randomanderson and removed request for a team July 13, 2026 17:00
@PerfectSlayer PerfectSlayer added tag: no release notes Changes to exclude from release notes comp: tooling Build & Tooling labels Jul 13, 2026
@PerfectSlayer PerfectSlayer requested review from sarahchen6 and removed request for a team July 13, 2026 17:00
@PerfectSlayer PerfectSlayer added the tag: ai generated Largely based on code generated by an AI or LLM label Jul 13, 2026
@PerfectSlayer PerfectSlayer requested a review from dougqh July 13, 2026 17:00

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

More details

The PR safely implements downgrading failed flaky tests to "skip" status when continueOnFailure=true, maintaining proper ordering and guard conditions to prevent double-tagging. Code is well-documented, handles the environment variable safely, and preserves existing behavior for normal test runs.

Was this helpful? React 👍 or 👎

📊 Validated against 3 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 7d30705 · What is Autotest? · Any feedback? Reach out in #autotest

@PerfectSlayer PerfectSlayer changed the title feat(ci): Report failed flaky tests as skip Report failed flaky tests as skip Jul 13, 2026
@datadog-official

datadog-official Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🎯 Code Coverage (details)
Patch Coverage: 100.00%
Overall Coverage: 57.02% (-0.01%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 94dbdf3 | Docs | Datadog PR Page | Give us feedback!

@dd-octo-sts

dd-octo-sts Bot commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

🟢 Java Benchmark SLOs — All performance SLOs passed

Suite Status
Startup 🟢 pass

SLO thresholds are defined here based on automatically generated metrics. A warning is raised when results are within 5% of the threshold.

PR vs. master results
Scenario Candidate master Δ (95% CI of mean)
startup:insecure-bank:iast:Agent 14.03 s 14.01 s [-0.6%; +0.8%] (no difference)
startup:insecure-bank:tracing:Agent 12.93 s 13.03 s [-1.6%; +0.1%] (no difference)
startup:petclinic:appsec:Agent 16.79 s 16.64 s [-0.2%; +2.0%] (no difference)
startup:petclinic:iast:Agent 16.38 s 16.77 s [-6.6%; +2.0%] (no difference)
startup:petclinic:profiling:Agent 16.66 s 16.75 s [-1.6%; +0.5%] (no difference)
startup:petclinic:sca:Agent 16.45 s 16.77 s [-6.3%; +2.6%] (no difference)
startup:petclinic:tracing:Agent 16.13 s 16.00 s [-0.1%; +1.7%] (no difference)

Commit: 94dbdf3c · CI Pipeline · Benchmarking Platform UI


Load and DaCapo benchmarks can be triggered manually in the GitLab pipeline. Results will appear in the Benchmarking Platform UI after completion.

Comment thread .gitlab/collect-result/JUnitReport.java Outdated
/// {@link #tagSyntheticFailures()} are left untouched.
void tagFailuresAsSkipped() {
for (var testcase : testcases()) {
if (hasFinalStatusProperty(testcase) || !isFailed(testcase)) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From a semantic point of view, we should treat all tests in that job as final_status=skip. The reason is that this status is really meant to describe the impact of the CI, regardless of its status.

For green CI, it does not change anything, as only test failures are looked. But the day we'll start to look over the test based to check tests that are ignored while been always green, it'll be be the canonical way of looking them : status=pass AND final_status=skip.

Though, as the present ticket is about the impact on Green CI, feel free to ignore my comment 😃 .

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let’s get it right now, it will save us time late.
I pushed follow up changes: 94dbdf3

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should treat all tests in that job as final_status=skip

Including normally passing tests?
From what I understand here you're saying it should behave the way CI is behaving: the ENV is to "continue on failure", so that if a failure halts CI, all previously passing tests would report as skipped? Correct?


I don't quite follow your second statement/comment. Why would we want to look at passed tests that have final_status=skip except to exclude such cases from SLAs (false positives)?

@mhdatie mhdatie Jul 13, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see Bruce already addressed the first part to report them all as skipped 94dbdf3

Edit: My webpage was stale so this comment came in late 😄

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@cbeauchesne Is there a way to check the results are following your expectations or do I need to merge it first?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp: tooling Build & Tooling tag: ai generated Largely based on code generated by an AI or LLM tag: no release notes Changes to exclude from release notes type: feature Enhancements and improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants