Skip to content

ci: count integration configurations with no result as failures - #792

Open
rkennke wants to merge 2 commits into
mainfrom
ci/gate-incomplete-integration-cells
Open

rkennke wants to merge 2 commits into
mainfrom
ci/gate-incomplete-integration-cells

Conversation

@rkennke

@rkennke rkennke commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Summary

post-pr-comment.sh gates the pipeline on the dd-trace integration matrix, but a configuration that produced no result counted as neither a pass nor a failure — so a broken cell could leave a PR green.

Found while investigating why PR #790 was red. There the flaky musl-x64-openj9-jdk21 cell did write a VALIDATION_FAILED log, so it gated correctly. Had the same cell hit its 10-minute timeout instead, the PR would have reported success.

The hole

The collection loop classifies each configuration, and unknown increments neither counter:

  if [ "${s1_status}" = "pass" ] && [ "${s2_status}" = "pass" ]; then
    RESULTS["${config_name}"]="pass";  TOTAL_PASS=$((TOTAL_PASS + 1))
  elif [ "${s1_status}" = "fail" ] || [ "${s2_status}" = "fail" ]; then
    RESULTS["${config_name}"]="fail";  TOTAL_FAIL=$((TOTAL_FAIL + 1))
  else
    RESULTS["${config_name}"]="unknown"        # ← counted nowhere
  fi
done

TOTAL=$((TOTAL_PASS + TOTAL_FAIL))             # ← excludes it entirely

Two shapes reach that branch, both from a matrix job dying before it writes its validation logs — the timeout firing mid-run, a lost runner, or a failure during prerequisite setup (jbang / JDK download):

  • artifact directory present but unreadable → classified unknown
  • artifact directory absent → the loop never sees the configuration at all

With 39 passes and one such cell, TOTAL_FAIL stays 0, the overall status is success, and the only trace is a :grey_question: in the matrix that nothing requires anyone to read. The existing TOTAL == 0 guard catches only the case where every cell dies; partial is the likely case.

Change

  • The expected matrix (8 platforms × 5 JDKs) is declared once, before collection, and drives both the completeness check and the table rendering, so the two cannot drift. Previously the platform list was inlined in the rendering branch only.
  • Collection now walks that expected matrix rather than only what turned up on disk, so a missing directory is caught alongside an empty one.
  • Any expected configuration that produced neither a pass nor a fail is counted and gates.
  • The comment names them under a ### No result produced heading instead of leaving a grey cell to be interpreted.
  • The exit log distinguishes the two conditions, since they now differ.

Verified

Fixtures of 39 passing configurations plus one in each state, run against this script and against the one on main:

one cell's state main this change
all 40 pass exit 0 exit 0
writes VALIDATION_FAILED exit 1 exit 1
directory present, no logs exit 0 — green exit 1
directory absent exit 0 — green exit 1
no results at all exit 1 exit 1

Note for anyone testing locally: the script uses declare -A, so macOS's bash 3.2 cannot run it and fails with exit 2 before reaching any of this logic. Use bash 4+.

Deliberately not included

Quarantining a known-flaky configuration remains the intended way to keep CI green — see #777, which introduces that policy for the GitHub Actions JUnit suite. It does not cover this path: these integration tests emit no JUnit XML (they are shell plus JFR conformance validation, reported by grepping validation logs), so a quarantine here needs the same policy — a list keyed by configuration name with a review_by expiry — against a different signal.

This change only ensures quarantine becomes the only way a red or missing cell leaves CI green.

🤖 Generated with Claude Code

post-pr-comment.sh derived the pipeline's fate from TOTAL_PASS and TOTAL_FAIL,
and a configuration whose validation log could not be read incremented
neither: it landed in RESULTS as "unknown", was excluded from TOTAL, and left
only a grey cell in the matrix. A configuration whose artifact directory was
missing entirely never reached the collection loop at all.

Either shape happens when a matrix job dies without writing its logs -- the
10 minute timeout firing mid-run, a lost runner, or a failure during
prerequisite setup. With 39 passes and one such cell the job reported success,
so a broken configuration left the PR green. The existing TOTAL == 0 guard
only caught the case where every cell died, and partial is the likely case.

The expected matrix is now declared once, ahead of collection, and drives both
the completeness check and the table rendering so the two cannot drift. Any
expected configuration that produced neither a pass nor a fail is counted and
gates, and the comment names them under their own heading rather than leaving
a grey cell to be interpreted.

Verified against fixtures of 39 passing cells plus one in each state, run
against this script and the one on main:

  cell state                        main   this change
  writes VALIDATION_FAILED          fail   fail
  directory present, no logs        PASS   fail
  directory absent                  PASS   fail
  all 40 pass                       pass   pass
  no results at all                 fail   fail

Quarantining a known-flaky configuration stays the intended way to keep CI
green, and is deliberately not added here: this only ensures that quarantine
is the *only* way a red or missing cell does so.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
@datadog-datadog-prod-us1

This comment has been minimized.

@dd-octo-sts

dd-octo-sts Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Scan-Build Report

User:runner@runnervmlun5p
Working Directory:/home/runner/work/java-profiler/java-profiler/ddprof-lib/src/test/make
Command Line:make -j4 all
Clang Version:Ubuntu clang version 18.1.3 (1ubuntu1)
Date:Thu Sep 17 09:47:45 2026

Bug Summary

Bug TypeQuantityDisplay?
All Bugs1
Logic error
Dereference of null pointer1

Reports

Bug Group Bug Type ▾ File Function/Method Line Path Length
Logic errorDereference of null pointerfaultInjection.cppcrashNow242

@dd-octo-sts

dd-octo-sts Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #35206887586 | Commit: 1dcaadb | Duration: 33m 36s (longest job)

All 32 test jobs passed

Status Overview

JDK glibc-aarch64/debug glibc-amd64/debug musl-aarch64/debug musl-amd64/debug
8 - - -
8-ibm - - -
8-j9 - -
8-librca - -
8-orcl - - -
11 - - -
11-j9 - -
11-librca - -
17 - -
17-graal - -
17-j9 - -
17-librca - -
21 - -
21-graal - -
21-librca - -
25 - -
25-graal - -
25-librca - -

Legend: ✅ passed | ❌ failed | ⚪ skipped | 🚫 cancelled

Summary: Total: 32 | Passed: 32 | Failed: 0


Updated: 2026-09-17 10:22:01 UTC

@rkennke
rkennke marked this pull request as ready for review September 16, 2026 16:43
@rkennke
rkennke requested a review from a team as a code owner September 16, 2026 16:43

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: aa03d6ffbe

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Comment on lines +198 to +201
### No result produced
These configurations wrote no validation log, so their outcome is unknown and
they are counted as failures. The job usually timed out or failed during setup;
see its log in the pipeline.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Include incomplete cells in the displayed counts

When only part of the expected matrix is incomplete, these cells gate the pipeline but are not added to TOTAL_FAIL or TOTAL, so the PR headline reports, for example, “39 passed, 0 failed out of 39 configurations” even though this section says the missing 40th cell is counted as a failure. Include TOTAL_INCOMPLETE in the displayed failure/total counts, or report it as a separate count in the headline, so the comment accurately explains the failed status.

Useful? React with 👍 / 👎.

@datadog-datadog-prod-us1 datadog-datadog-prod-us1 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: FAIL

A partial matrix failure stops the pipeline. The PR comment omits incomplete cells from its failure and total counts.

Open Bits AI session

🤖 Datadog Autotest · Commit aa03d6f · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

case "${RESULTS[${config}]:-missing}" in
pass|fail) ;;
*)
TOTAL_INCOMPLETE=$((TOTAL_INCOMPLETE + 1))

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.

P2 Include incomplete cells in the displayed totals

The pipeline fails correctly, but the PR comment gives reviewers incorrect summary counts.

Assertion details
  • Input: Thirty-nine configurations pass and one expected configuration produces no validation log.
  • Expected: The comment must report 39 passed, 0 failed, and 1 without a result out of 40 expected configurations.
  • Actual: The comment reports 39 passed, 0 failed out of 39 configurations. It lists the missing 40th configuration separately as a failure.

Was this helpful? React 👍 or 👎
🤖 Datadog Autotest · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest · Open Bits AI session

@dd-octo-sts

dd-octo-sts Bot commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

All 40 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 ddaec375

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants