PrefectHQ
prefect
BlogDocsChangelog

Add client-side configuration for deployment concurrency grace period

#19489Merged
Comparing
devin/1763582330-add-deployment-concurrency-grace-period
(
6dd8a71
) with
main
(
63d071d
)
CodSpeed Performance Gauge
0%
Untouched
2
Ignored
6

Benchmarks

Passed

bench_task_decorator
benches/bench_tasks.py
CodSpeed Performance Gauge
0%
465.1 µs465.2 µs
bench_import_prefect_flow
benches/bench_import.py
CodSpeed Performance Gauge
0%
1.4 s1.4 s

Ignored

bench_flow_call[options0]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+1%
167.8 ms166.3 ms
bench_flow_call[options1]
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
0%
107.6 ms107.6 ms
bench_task_submit
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+17%
5.4 ms4.7 ms
bench_import_prefect
benches/bench_import.py
Ignored
CodSpeed Performance Gauge
0%
1.1 s1.1 s
bench_flow_decorator
benches/bench_flows.py
Ignored
CodSpeed Performance Gauge
+8%
6.7 ms6.2 ms
bench_task_call
benches/bench_tasks.py
Ignored
CodSpeed Performance Gauge
+1%
164.9 ms162.9 ms

Commits

Click on a commit to change the comparison range
Base
main
63d071d
-0.03%
feat: add client-side configuration for deployment concurrency grace period Add `grace_period_seconds` to deployment concurrency options, allowing users to configure how long infrastructure has to start before concurrency slots are released. This addresses #19410 and brings OSS feature parity with Prefect Cloud. Changes: - Add `grace_period_seconds` field to `ConcurrencyOptions` (server) and `ConcurrencyLimitConfig` (client) schemas with validation (60-86400s) - Update `SecureFlowConcurrencySlots` orchestration policy to use the configured grace period, falling back to server setting when not set - Add CLI and YAML support for `grace_period_seconds` in deployments - Add `_extract_concurrency_options` helper to reduce code duplication - Filter None values from serialized concurrency config Example usage in prefect.yaml: ```yaml deployments: - name: my-deployment concurrency_limit: limit: 1 collision_strategy: ENQUEUE grace_period_seconds: 720 ``` Closes #19410 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
6dd8a71
17 days ago
by zzstoatzz
© 2025 CodSpeed Technology
Home Terms Privacy Docs