Skip to content

Report failed flaky tests as skip#11931

Merged
gh-worker-dd-mergequeue-cf854d[bot] merged 3 commits into
masterfrom
bbujon/ci-results
Jul 15, 2026
Merged

Report failed flaky tests as skip#11931
gh-worker-dd-mergequeue-cf854d[bot] merged 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

This comment has been minimized.

@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 13.97 s 13.93 s [-0.5%; +1.0%] (no difference)
startup:insecure-bank:tracing:Agent 12.95 s 13.04 s [-1.4%; -0.0%] (maybe better)
startup:petclinic:appsec:Agent 16.37 s 16.14 s [-4.6%; +7.5%] (unstable)
startup:petclinic:iast:Agent 16.82 s 16.37 s [-1.6%; +7.1%] (no difference)
startup:petclinic:profiling:Agent 16.48 s 16.71 s [-2.4%; -0.3%] (maybe better)
startup:petclinic:sca:Agent 16.74 s 16.68 s [-0.8%; +1.5%] (no difference)
startup:petclinic:tracing:Agent 16.07 s 15.61 s [-1.2%; +7.2%] (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?

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.

Including normally passing tests?

Yes. It's surprising, but the idea behind CONTINUE_ON_FAILURE=true is : whatever the test will say, it'll be ignored.

On the long run, we'd like to monitor such test, because if ever they constantly succeed, it does not make sense to ignore their outcome, and we'd like to remove them form this quarantine. It's the purpose of final_status to store this information. The difference is subtile, but it'll allow us to treat those "healthy but quarantined" tests at scale.

Copy link
Copy Markdown
Contributor

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.

ah, it's because it runs only on master :

- *master_only

You can do a dummy commit to run it on your branch, my link above will tell if it's fine

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.

On the long run, we'd like to monitor such test,

The Java Guild does. We have to widgets for:

You can do a dummy commit to run it on your branch

Thanks, I’ll give it a try. That will take some time to run / take care of.

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.

This looks to be working. Reverting the CI changes then merging. Thanks for the link!

@PerfectSlayer

Copy link
Copy Markdown
Contributor Author

/merge

@gh-worker-devflow-routing-ef8351

gh-worker-devflow-routing-ef8351 Bot commented Jul 15, 2026

Copy link
Copy Markdown

View all feedbacks in Devflow UI.

2026-07-15 12:27:00 UTC ℹ️ Start processing command /merge


2026-07-15 12:27:11 UTC ℹ️ MergeQueue: waiting for PR to be ready

This pull request is not mergeable according to GitHub. Common reasons include pending required checks, missing approvals, or merge conflicts — but it could also be blocked by other repository rules or settings.
It will be added to the queue as soon as checks pass and/or get approvals. View in MergeQueue UI.
Note: if you pushed new commits since the last approval, you may need additional approval.
You can remove it from the waiting list with /remove command.


2026-07-15 13:16:06 UTC ℹ️ MergeQueue: merge request added to the queue

The expected merge time in master is approximately 2h (p90).


2026-07-15 14:17:47 UTC ℹ️ MergeQueue: This merge request was merged

@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot merged commit 8d9ad4d into master Jul 15, 2026
1179 of 1183 checks passed
@gh-worker-dd-mergequeue-cf854d
gh-worker-dd-mergequeue-cf854d Bot deleted the bbujon/ci-results branch July 15, 2026 14:17
@github-actions github-actions Bot added this to the 1.65.0 milestone Jul 15, 2026
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