You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@burr.apache.org by "andreahlert (via GitHub)" <gi...@apache.org> on 2026/04/09 13:50:18 UTC
[PR] fix: async interceptor should_intercept must be sync + temporal example fixes [burr]
andreahlert opened a new pull request, #734:
URL: https://github.com/apache/burr/pull/734
## Summary
Fixes bugs in the interceptor lifecycle hooks introduced in #602:
- **`should_intercept` on async interceptor classes was declared `async def`**, but callers use it inside lambdas passed to `get_first_matching_hook()` which cannot `await`. An async `should_intercept` returns a coroutine object (always truthy), silently matching every action regardless of the predicate logic. Changed to `def` with a note explaining why.
- **`StreamingActionInterceptorHookAsync.intercept_stream_run_and_update`** was `def` but the caller checks `isasyncgenfunction`, so it needs to be `async def` to match.
- **Temporal example** called `worker_adapter_set.get_hooks()` which doesn't exist on `LifecycleAdapterSet`. Replaced with `call_all_lifecycle_hooks_async()`.
- **Temporal worker hook signatures** used `str` for action and `**kwargs` instead of `Action` and `**future_kwargs`.
## Test plan
- [x] All 311 tests pass (core + lifecycle + interceptor integration tests)
- [x] No changes to test files needed (tests already used sync `should_intercept`)
- [x] Verified no remaining `async def should_intercept` in codebase
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] fix: async interceptor should_intercept must be sync + temporal example fixes [burr]
Posted by "skrawcz (via GitHub)" <gi...@apache.org>.
skrawcz merged PR #734:
URL: https://github.com/apache/burr/pull/734
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@burr.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org