chore: handle potential after-import exceptions - #19786
Conversation
Codeowners resolved asResolved from the full PR diff against |
Circular import analysis
|
Dependency direction analysis
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5d85499c03
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @pytest.mark.subprocess | ||
| def test_module_watchdog_after_import_hook_isolation(): |
There was a problem hiding this comment.
Allow the expected stderr from the failing hook
This subprocess test installs Failing.after_import, which always raises, and the changed loader logs that exception with log.exception; under the default ddtrace logger this writes a traceback to stderr. The subprocess harness defaults err to "" and fails when stderr is non-empty, so this regression test will fail in the internal suite unless the marker disables/checks stderr output or disables the stream handler.
Useful? React with 👍 / 👎.
|
We handle potential exceptions raised during the execution of the after-import module watchdog hook.
5d85499 to
202b0f4
Compare
BenchmarksBenchmark execution time: 2026-08-20 12:01:30 Comparing candidate commit 202b0f4 in PR branch Found 0 performance improvements and 10 performance regressions! Performance is the same for 606 metrics, 10 unstable metrics.
|
Description
We handle potential exceptions raised during the execution of the after-import module watchdog hook.