Skip to content

Code Review Bench PR #20160 - Add arun_deployment and replace @sync_compatible with @async_dispatch#19

Open
kayagokalp wants to merge 3 commits intobase_pr_20160_20260125_5936from
corrupted_pr_20160_20260125_5936
Open

Code Review Bench PR #20160 - Add arun_deployment and replace @sync_compatible with @async_dispatch#19
kayagokalp wants to merge 3 commits intobase_pr_20160_20260125_5936from
corrupted_pr_20160_20260125_5936

Conversation

@kayagokalp
Copy link

Benchmark PR for Gitar evaluation

Original PR: agentic-review-benchmarks#6

Add arun_deployment and replace @sync_compatible with @async_dispatch

desertaxle and others added 3 commits January 25, 2026 12:10
This change follows the intent of issue PrefectHQ#15008 to replace implicit
sync/async conversion with explicit, type-safe alternatives.

Changes:
- Add `arun_deployment` as an explicit async function for running deployments
- Replace `@sync_compatible` with `@async_dispatch` on `run_deployment`
- `run_deployment` now dispatches to `arun_deployment` in async context
- Sync context uses `SyncPrefectClient` directly (no event loop magic)
- Export `arun_deployment` from `prefect.deployments`
- Add comprehensive tests for both sync and async behavior

The `run_deployment.aio` attribute is preserved for backward compatibility.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants