[NO-TICKET] Print failure info when native extension setup fails#5657
Conversation
**What does this PR do?** When the native extension setup fails, the default mkmf error message is shown which unfortunately doesn't include any details to debug the failure. This PR fixes that by wrapping the mkmf failure to print more info. **Motivation:** Investigating flaky build failures like https://github.com/DataDog/dd-trace-rb/actions/runs/24427070812/job/71416807129?pr=5590 where we see the failure but lack the context to investigate. **Change log entry** Yes. Print failure info when native extension setup fails **Additional Notes:** N/A **How to test the change?** To test this locally, I was changing our `extconf.rb` files with something along the lines of ```ruby have_header("does_not_exist.h") abort "forced failure" ``` Then running `bundle exec rake clean compile` to trigger.
Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: ef25d67 | Docs | Datadog PR Page | Give us feedback! |
|
/merge |
|
View all feedbacks in Devflow UI.
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.
devflow unqueued this merge request: It did not become mergeable within the expected time |
BenchmarksBenchmark execution time: 2026-05-05 09:17:07 Comparing candidate commit ef25d67 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 45 metrics, 1 unstable metrics.
|
What does this PR do?
When the native extension setup fails, the default mkmf error message is shown which unfortunately doesn't include any details to debug the failure.
This PR fixes that by wrapping the mkmf failure to print more info.
Motivation:
Investigating flaky build failures like
https://github.com/DataDog/dd-trace-rb/actions/runs/24427070812/job/71416807129?pr=5590 where we see the failure but lack the context to investigate.
Change log entry
Yes. Print failure info when native extension setup fails
Additional Notes:
N/A
How to test the change?
To test this locally, I was changing our
extconf.rbfiles with something along the lines ofThen running
bundle exec rake clean compileto trigger.