PrefectHQ
prefect
Blog
Docs
Changelog
Blog
Docs
Changelog
Overview
Branches
Benchmarks
Runs
Performance History
Latest Results
fix: add --no-create-pool-if-not-found flag and fix tests for PR #21004 Implements the create_pool_if_not_found boolean CLI flag on the worker start() command using the correct cyclopts negative= parameter syntax (instead of the typer-style slash notation from the PR). Updates all existing tests that assert on worker_cls() constructor kwargs to include create_pool_if_not_found=True (the default), and adds two new tests covering default behavior and the --no-create-pool-if-not-found flag. https://claude.ai/code/session_01ENHt9FzX43ecFSrPTwA6Q9
VittoriaLanzo:claude/fix-pool-flag-tests-C5JTy
1 hour ago
use cyclopts native lazy loading for CLI commands replace the home-rolled trampoline pattern (`_build_lazy_command_app`) with cyclopts 4.8.0's native lazy loading via import path strings. this removes ~90 lines of dispatch code and lets cyclopts handle resolution, help stubs, and alias forwarding directly. cyclopts 4.8.0 (BrianPugh/cyclopts#761) adds `help=`, `show=`, `group=`, and `sort_key=` fields to `CommandSpec`, so lazy commands appear in `--help` output with their descriptions without resolving any import paths. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
cli-native-lazy-loading
4 hours ago
Fix inaccurate AGENTS.md contracts for task engine state and event schemas (#21016) Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Co-authored-by: Alex Streed <alex.s@prefect.io> Co-authored-by: alex.s <ajstreed1@gmail.com>
main
9 hours ago
Bump packaging upper bound from <25.1 to <26.1 (#21015)
main
9 hours ago
test(worker): update assertions and add tests for create_pool_if_not_found flag Fix the 5 failing "Runner, Worker, Settings, Input, and CLI Tests" CI checks. The new create_pool_if_not_found kwarg added in the previous commit is now passed to worker_cls(...), but 6 existing mock-based tests asserted the call signature without it, causing strict assert_called_once_with() failures. Changes: - Add create_pool_if_not_found=True to all 6 existing mock_worker.assert_called_once_with() calls - Add test_start_worker_create_pool_if_not_found_default: verifies the flag defaults to True - Add test_start_worker_no_create_pool_if_not_found: verifies --no-create-pool-if-not-found passes False
VittoriaLanzo:fix/20980-no-create-pool-if-not-found
10 hours ago
Bump packaging upper bound from <25.1 to <26.1
purificant:bump-packaging-upper-bound
12 hours ago
fix: resolve deployment concurrency slot lease release race condition Fixes critical race condition where deployment concurrency lease_id is read from the wrong state object after propose_state() overwrites the flow run's state, causing slots to remain occupied until TTL expires. Also prevents flows from being incorrectly marked as Crashed when BaseExceptions occur during post-execution state transitions. ## Root Cause ### Race Condition (Issue #17415) In FlowRunEngine.set_state() (both sync and async): 1. Flow in RUNNING state with lease_id in state_details 2. propose_state(Completed()) returns new COMPLETED state 3. propose_state() OVERWRITES self.flow_run.state with new state 4. Code reads lease_id from self.flow_run.state (now COMPLETED with lease_id=null) 5. release_concurrency_slots_with_lease() never called 6. Slot remains occupied until 300s TTL expiration 7. Other flows stuck in AwaitingConcurrencySlot state ### False Crash Detection (Issue #19068) When flows complete successfully but encounter infrastructure issues: 1. User code completes successfully 2. set_state(Completed()) makes API call 3. Lease renewal or API timeout raises BaseException 4. Existing code: "BaseException + not final state = crash!" 5. Flow incorrectly marked as CRASHED despite successful execution ## Changes ### Client-Side Fix (flow_engine.py) **Lease Release Timing Fix:** - Capture lease_id from current state BEFORE calling propose_state() - Use saved lease_id value for release API call - Applied to both sync (lines 507-545) and async (lines 1145-1180) **False Crash Prevention:** - Add `_flow_executed` flag to track when user code finishes - Set flag in handle_success() after user code completes - Update BaseException handler to check flag before marking as crashed - Prevents infrastructure issues from masking successful executions ### Server-Side Fixes (core_policy.py) - Fix SecureFlowConcurrencySlots.cleanup() to only decrement if lease exists - Restore ReleaseFlowConcurrencySlots.after_transition() with version checking ### Backwards Compatibility (dependencies.py + core_policy.py) - Added MIN_CLIENT_VERSION_FOR_CLIENT_SIDE_LEASE_RELEASE = Version("3.6.23") - Old clients (< 3.6.23 or None): Server auto-releases (prevents orphans) - New clients (>= 3.6.23): Client-side release only (avoids race) - Defaults to old behavior when version unknown (safe default) ## Testing - All 70 existing TestFlowConcurrencyLimits tests pass - Parameterized 4 key tests for old/new client behaviors - Added lease renewal failure resilience tests Closes #17415 Closes #19068 Related: #18942
ubiquitousbyte:fix/deployment-concurrency-lease-release
12 hours ago
Add end_time filter support for flow & task runs
jellyfish0316:feature/end-time-filter
14 hours ago
Active Branches
use cyclopts native lazy loading for CLI commands
last run
4 hours ago
#21017
CodSpeed Performance Gauge
0%
feat(worker): add --no-create-pool-if-not-found flag to worker start
last run
10 hours ago
#21004
CodSpeed Performance Gauge
0%
Fix deployment concurrency slot lease release race condition
last run
12 hours ago
#21014
CodSpeed Performance Gauge
0%
© 2026 CodSpeed Technology
Home
Terms
Privacy
Docs