-
Notifications
You must be signed in to change notification settings - Fork 2k
19404 running concurrency limit #19863
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
CodSpeed Performance ReportMerging #19863 will not alter performanceComparing Summary
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
closes #19404
Summary
This PR fixes an issue where setting a deployment concurrency limit while flows are already in
RUNNINGstate does not immediately apply the limit to those running flows. The root cause is thatSecureFlowConcurrencySlotsorchestration rule only applies to flows transitioning toPENDINGstate, so flows alreadyRUNNINGnever acquire leases when a limit is set. This fix modifies theupdate_deploymentAPI endpoint to retroactively acquire concurrency slots and create leases for existingRUNNINGflows when a limit is added or decreased, ensuring that no further flows can start until the number of running flows falls below the limit. This is particularly useful when a sudden spike in flow runs needs to be capped immediately, as previously this could only be achieved by setting the limit to 0 and increasing it again once flows drained. The implementation includes useful unit tests verifying both adding a limit and decreasing a limit scenarios.Checklist
<link to issue>"mint.json.I've not removed any docs
I've not added any new function or class