acoustic-carpenter-78188
03/24/2026, 1:20 AM@flyte.trace decorator on regular (non-async) Python functions. The main changes add the ability to record traces for synchronous tasks, update the controller interfaces to support blocking coroutine execution, and provide new examples and tests for sync tracing.
Synchronous tracing support:
• Implemented synchronous tracing logic in the @flyte.trace decorator, enabling trace recording for plain (sync) functions by running the trace logic in a blocking manner (run_coroutine_blocking) instead of requiring async/await.
• Added a new example (examples/basics/trace_sync.py) demonstrating how to use @flyte.trace with synchronous tasks and functions.
Controller interface and implementation updates:
• Added a run_coroutine_blocking method to the controller interface and both local and remote controller implementations, allowing synchronous code to execute coroutines on the controller's event loop and block until completion. [1] [2] [3] [4]
Testing and validation:
• Added new tests to verify that synchronous traced functions and tasks work as expected, including a traced sync function (sync_square) and a sync task (sync_traces_loop) with corresponding test cases. [1] [2] [3]
flyteorg/flyte-sdkacoustic-carpenter-78188
03/24/2026, 4:08 AMacoustic-carpenter-78188
03/24/2026, 1:10 PMacoustic-carpenter-78188
03/26/2026, 9:15 PM