feat: let a PrefectDeployment set its concurrency collision strategy #421
All Vouch review confidence checks passed
Residual risk 0.26 = Change Risk (0.60) × (1 − Review Confidence (0.57)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.60 · 234 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.327
Shallow Review Depth
shallow_review_depth
0.289
Sensitive Paths
sensitive_paths
0.060
Real PR Conversation Timeline
1 comments
"Review active on #421"
general
weight: 0.35
chrisguidry
Prefect's deployment create/update accept
concurrency_optionsnext toconcurrency_limit: acollision_strategy(ENQUEUEorCANCEL_NEW) and anoptional
grace_period_seconds(60-86400).prefect deployusers set it inprefect.yaml as
concurrency_limit: {limit: 1, collision_strategy: CANCEL_NEW}.The operator never sent or read the field, so a deployment's limit always
behaved as
ENQUEUE, and a value set directly in Prefect survived every resync.spec.deployment.concurrencyOptions {collisionStrategy, gracePeriodSeconds},with enum and bounds validation. A CEL rule rejects it without
concurrencyLimit: Prefect only reads the options while the deployment has alimit.
concurrency_optionsback.The up-to-date check compares the whole object, so an out-of-band change is
reverted on the next resync.
status.appliedFieldsthe same way #314 handlesconcurrencyLimit.Tests: unit tests for conversion, the diff (each differing field) and the client
payload (sent, omitted, explicit null). Controller tests against the fake Prefect
API cover apply, drift revert, clearing the options alone, clearing them with the
limit, and the CRD validation.
make verify,make testandmake lintpass.Against a live Prefect 3.9.3 server, a direct PATCH of
concurrency_optionsisaccepted and returned in the deployment response, with
grace_period_seconds: nullwhen unset.
Separately (not changed here):
globalConcurrencyLimitsendsglobal_concurrency_limits: [name], which Prefect 3.9.3 and 3.9.4'sDeploymentCreatedoesn't define, so the server answers 422extra_forbidden;its
limit,collisionStrategy,activeandslotDecayPerSecondfields arealso never sent. Happy to open an issue for that.