Commits
Click on a commit to change the comparison rangeAdd grace_period_seconds to deployment concurrency options
- Add grace_period_seconds field to ConcurrencyOptions in both client and server schemas
- Add grace_period_seconds field to ConcurrencyLimitConfig in client schemas
- Update SecureFlowConcurrencySlots to use grace_period_seconds with fallback to server setting
- Update RunnerDeployment mapping logic to handle grace_period_seconds from ConcurrencyLimitConfig
- Default grace period is 600 seconds (10 minutes) with min 60s and max 86400s (1 day)
- Falls back to server setting initial_deployment_lease_duration when not configured
This allows users to configure the concurrency grace period per-deployment in prefect.yaml:
deployments:
- name: my-deployment
concurrency_limit:
limit: 1
collision_strategy: ENQUEUE
grace_period_seconds: 720
Closes #19410
Co-Authored-By: Nate Nowack <nate@prefect.io>3 days ago
by devin-ai-integration[bot] Add comprehensive test coverage for grace_period_seconds
- Fix SecureFlowConcurrencySlots to normalize concurrency_options before accessing attributes
- Add test for server setting fallback when concurrency_options not set
- Add test for model default (600s) when concurrency_options exists but grace_period_seconds not set
- Add test for custom grace_period_seconds (720s)
- Update helper function to support grace_period_seconds parameter
- Import get_current_settings in test file
Co-Authored-By: Nate Nowack <nate@prefect.io>3 days ago
by devin-ai-integration[bot] Apply ruff formatting to test file
Co-Authored-By: Nate Nowack <nate@prefect.io>3 days ago
by devin-ai-integration[bot] Apply ruff formatting to dict comprehension
Co-Authored-By: Nate Nowack <nate@prefect.io>3 days ago
by devin-ai-integration[bot]