Skip to content

Pin jafar-shell to 0.30.0 in Tier 3 dd-trace-integration setup (PROF-16957) - #1073

Merged
jbachorik merged 5 commits into
mainfrom
dd/pin-jafar-shell-in-tier-3-dd-trace-integration-setup-0-30-0-89fw
Nov 30, 2026
Merged

jbachorik merged 5 commits into
mainfrom
dd/pin-jafar-shell-in-tier-3-dd-trace-integration-setup-0-30-0-89fw

Conversation

@jbachorik

@jbachorik jbachorik commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?:

Vendors a version-pinned jbang launcher for jafar-shell (test-validation/jfr-shell.java, pinning io.btrace:jafar-shell:0.30.0) and points every Tier 3 dd-trace-integration jfr-shell invocation at it, replacing the jfr-shell@btraceio catalog alias whose launcher script is re-fetched from btraceio/jbang-catalog on every fresh runner and whose pinned artifact version moves on every upstream release. Adapts the event-type probe caller contract to 0.30.0's stricter script engine.

Motivation:

Every Tier 3 dd-trace-integration cell fails in setup on main and on all open PRs since the upstream catalog launcher moved its pinned artifact from 0.29.0 to 0.30.0 (2026-11-29T17:57Z): pipeline 156940877 failed 31 integration jobs on main, PR #1070's pipeline 156967361 failed all 30 cells including a manual retry. Each cell fails the probe self-check before any test runs.

Verified mechanism: 0.30.0's script engine aborts the script at the first failed command, while 0.29.0 continued and exited 0. The probe relies on the old behavior — an unresolvable event type fails its set by design (the absent-type HAS line is suppressed) and the probe must keep going. On 0.30.0 the probe aborts at the first absent custom type, never emits PROBE_COMPLETE, and the caller falls back to a degraded state.

The fix, in three parts:

  1. Pinned launcher. test-validation/jfr-shell.java pins io.btrace:jafar-shell:0.30.0 (//JAVA 25, //MAIN io.jafar.shell.Main — the same entry point the alias used). CI's jbang --java 25 matches the directive; the Tier 3 cells only provision JDK 25 for jbang. The pre-warm in install-prerequisites.sh gained a missing-file guard so a partial checkout writes an accurate skip marker instead of a misleading Maven-resolution warning.
  2. --continue-on-error. Present in both 0.29.0 and 0.30.0; the probe invocations pass it, restoring 0.29.0's tolerant probe output on 0.30.0. The probe then exits 1 whenever a tracked custom type is absent (no in-script exit command can override that), so the exit code can no longer be the completeness signal.
  3. PROBE_COMPLETE as the completeness signal. validate-jfr-conformance.sh captures the probe output regardless of exit code and falls back to all-present only when PROBE_COMPLETE is missing from the output. validate-jfr.jfrs needs no change: all its event-type queries are gated behind HAS-flag ifs and a full run is verified identical under both versions (exit 0, 425 commands).

Accepted cost, for reviewer acknowledgment: on 0.30.0 the probe exits 1 whenever a tracked custom type is absent — normal for profiler-only recordings — with the failed query documented on stderr and the signal fully carried by stdout. The hermetic suite gains an exit-1-probe case pinning that no fallback happens. The incomplete-probe fallback semantics also change with the engine: a genuinely absent type now fails its validation set and the run fails loudly instead of completing partially.

Additional Notes:

Human review: recommended — CI-infra change whose real-probe behavior on 0.30.0 was verified locally (macOS arm64, jbang-managed JDK 25) and is re-verified by the Tier 3 cells only after merge.

Agentic review: reviewer subagent (fresh context, medium effort) over 6d63d0fb2..HEAD, plus two re-review rounds of the fixes. Round 1: 1 High (hermetic stub's probe branch hardcoded exit 0, so the exit-1-probe case was not exercised), 2 Medium (fallback comment/test title described 0.29.0 behavior; .jfrs shebangs contradicted the pin), 2 Low — all fixed and re-reviewed; final round clean, no open findings.

Ticket: PROF-16957 (evidence and decision history on the ticket).

How to test the change?:

# probe contract against the pinned launcher (needs jbang; JDK 25 for jbang)
bash .gitlab/dd-trace-integration/tests/probe_event_types_real_test.sh

# hermetic probe-caller contract, incl. the exit-1-probe case
bash .gitlab/dd-trace-integration/tests/validate_conformance_probe_test.sh

# unaffected suites
bash .gitlab/dd-trace-integration/tests/newest_jfr_test.sh
bash .gitlab/dd-trace-integration/tests/post_pr_comment_test.sh
bash .gitlab/dd-trace-integration/tests/validate_quarantine_test.sh

All five pass locally. End-to-end confirmation is the Tier 3 dd-trace-integration pipeline going green through setup after merge (the cells' JDK/proxy environment cannot be reproduced locally).

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.
  • This PR doesn't touch any of that.
  • JIRA: PROF-16957

The jfr-shell@btraceio jbang catalog alias resolves a launcher script from
btraceio/jbang-catalog whose pinned version moves on every upstream release;
0.30.0 (published 2026-11-29T17:55Z) aborts the event-type probe on the first
'Event type not found' query, failing every Tier 3 dd-trace-integration cell
in setup. Vendor the 0.29.0 launcher as test-validation/jfr-shell.java and
point the pre-warm, probe and conformance invocations at it.
0.30.0's script engine aborts at the first failed command, where 0.29.0
continued and exited 0. The probe's absent-type 'set' failures are by design,
so its invocation passes 'script --continue-on-error' (supported by both
versions) and the caller treats PROBE_COMPLETE in the output, not the exit
code, as the completeness signal: 0.30.0 exits 1 whenever a tracked custom
type is absent. validate-jfr.jfrs needs no change - all its event-type
queries are gated behind HAS-flag ifs. Pin bumped 0.29.0 -> 0.30.0; verified
locally that the full validation runs identically under both versions.
- hermetic test: the stub's probe invocation now returns the same exit code
  as the validation one, so case 2b actually exercises an exit-1 probe;
- the incomplete-probe fallback comment and test-3 title state the 0.30.0
  behavior: a genuinely absent type fails its validation set and the run
  fails loudly instead of completing partially;
- the .jfrs shebangs referenced the moving catalog alias; replaced with a
  comment naming the pinned-launcher invocation;
- launcher comment: //JAVA 25 matches CI's --java 25, it does not override
  anything;
- pre-warm: a missing launcher writes the skip marker with an accurate
  message instead of failing the Maven-resolution path.
@jbachorik jbachorik added the AI label Nov 30, 2026
@jbachorik

Copy link
Copy Markdown
Collaborator Author

@DataDog review

@datadog-prod-us1-5 datadog-prod-us1-5 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.

Bits Code Review: PASS

More details

The probe caller accepts complete output when absent custom event types make jafar-shell exit 1, without triggering the fallback. The specialist reported no actionable regressions; runtime behavior with the pinned launcher remains unverified because jbang is unavailable.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit cb6ab51

@jbachorik
jbachorik marked this pull request as ready for review November 30, 2026 12:47
@jbachorik
jbachorik requested a review from a team as a code owner November 30, 2026 12:47
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-30T12:49:15.010895Z cb6ab51 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-prod-us1-5 datadog-prod-us1-5 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.

Bits Code Review: PASS

More details

The probe caller preserves completed output when absent event types cause jafar-shell to exit 1. The static reviewer identified no actionable defects; runtime confirmation against the pinned launcher remains unverified because jbang is unavailable.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit cb6ab51

@dd-octo-sts

dd-octo-sts Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

Memory overhead check: ✅ within budget

Profiler cb6ab51aa, pipeline. Budget: utils/memcheck/budget.txt. NMT and /proc values are profiled minus no-profiler runs on the same runner.

scenario metric value Δ since budget set limit headroom
allocs native_mem_live_bytes 21.71 MiB +18 KiB 21.95 MiB 248 KiB ok
allocs native_mem_max_bytes 22.95 MiB +2 KiB 23.20 MiB 254 KiB ok
allocs nmt.class 301 KiB +4 KiB 563 KiB 262 KiB ok
allocs nmt.internal 366 KiB −2 KiB 666 KiB 299 KiB ok
classesM native_mem_live_bytes (coverage-corrected) 23.30 MiB +18 KiB 23.55 MiB 258 KiB ok
classesM native_mem_max_bytes (coverage-corrected) 25.19 MiB −3 KiB 25.45 MiB 270 KiB ok
classesM nmt.class 2.94 MiB −2 KiB 3.20 MiB 268 KiB ok
classesM nmt.internal 3.20 MiB −1 KiB 3.50 MiB 308 KiB ok
mixed native_mem_live_bytes 23.18 MiB +35 KiB 23.45 MiB 272 KiB ok
mixed native_mem_max_bytes 40.76 MiB +36 KiB 41.00 MiB 250 KiB ok
mixed nmt.class 300 KiB −7 KiB 563 KiB 263 KiB ok
mixed nmt.internal 405 KiB −5 KiB 717 KiB 312 KiB ok
threads native_mem_live_bytes 19.08 MiB −14 KiB 19.35 MiB 280 KiB ok
threads native_mem_max_bytes 20.09 MiB −21 KiB 20.40 MiB 318 KiB ok
threads nmt.class 114 KiB +1 KiB 410 KiB 296 KiB ok
threads nmt.internal 156 KiB −8 KiB 461 KiB 305 KiB ok
traces native_mem_live_bytes 20.23 MiB −2 KiB 20.50 MiB 279 KiB ok
traces native_mem_max_bytes 21.41 MiB +3 KiB 21.70 MiB 294 KiB ok
traces nmt.class 470 KiB −2 KiB 768 KiB 299 KiB ok
traces nmt.internal 604 KiB −10 KiB 870 KiB 266 KiB ok

✅ nmt.tracing absent in every scenario.

Not budgeted (too noisy on shared runners)
scenario nmt.code nmt.gc nmt.total proc.VmRSS proc.RssAnon
allocs 1.64 MiB 1 KiB 3.03 MiB 32.04 MiB 27.71 MiB
classesM 6.14 MiB −4 KiB 14.59 MiB 38.24 MiB 33.60 MiB
mixed 1.74 MiB 22 KiB 2.77 MiB 31.56 MiB 26.92 MiB
threads 6 KiB 2 KiB 1014 KiB 25.26 MiB 19.94 MiB
traces 2.87 MiB −27 KiB 4.34 MiB 26.63 MiB 21.97 MiB

@dd-octo-sts

dd-octo-sts Bot commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

✅ All 30 integration tests passed

📊 Dashboard · 👷 Pipeline · 📦 cb6ab51a

10 not applicable (not scheduled): musl-x64-openj9, musl-arm64-openj9. OpenJ9 requires glibc; upstream publishes no musl runtime.

@dd-octo-sts

dd-octo-sts Bot commented Nov 30, 2026

Copy link
Copy Markdown
Contributor

CI Test Results

Run: #46420531565 | Commit: 7a62f56 | Duration: 34m 14s (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-11-30 13:15:33 UTC

@datadog-prod-us1-5

This comment has been minimized.

@jbachorik
jbachorik merged commit 448bc80 into main Nov 30, 2026
134 of 148 checks passed
@jbachorik
jbachorik deleted the dd/pin-jafar-shell-in-tier-3-dd-trace-integration-setup-0-30-0-89fw branch November 30, 2026 13:39
@github-actions github-actions Bot added this to the 1.54.0 milestone Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant