Allow for dynamic concurrency limit for generate artifacts in Prefect#9353
Draft
ogenstad wants to merge 1 commit into
Draft
Allow for dynamic concurrency limit for generate artifacts in Prefect#9353ogenstad wants to merge 1 commit into
ogenstad wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
No issues found across 7 files
Confidence score: 5/5
- Automated review surfaced no issues in the provided summaries.
- No files require special attention.
Shadow auto-approve: would auto-approve. This PR adds a configurable concurrency cap for the artifact-generate workflow with a safe default of 10, fully tested via unit tests, and follows existing patterns without altering core business logic, data, or infrastructure.
Re-trigger cubic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
A very high number of concurrent requests to regenerate artefacts could overwhelm the system, this PR introduces a way to configure a limit when it comes to concurrent tasks of this type.
While the initial target is for artifacts it can be expanded to include other jobs as well.
What changed
How to review
How to test
# Commands to validateImpact & rollout
Checklist
uv run towncrier create ...)Summary by cubic
Adds an operator-configurable concurrency cap for the
artifact-generateworkflow inPrefectdeployments to prevent overload. Default cap is 10; set to 0 for no cap.New Features
WorkflowConcurrencyLimitswithartifact_generatelimit (default10).artifact-generatelinks to this setting viaConcurrencyLimitConfig;0becomesNone(unlimited) on the deployment.INFRAHUB_WORKFLOW_CONCURRENCY_LIMIT_ARTIFACT_GENERATEand wired it indocker-compose.yml.Migration
artifact-generateat 10.INFRAHUB_WORKFLOW_CONCURRENCY_LIMIT_ARTIFACT_GENERATE=<int>.INFRAHUB_WORKFLOW_CONCURRENCY_LIMIT_ARTIFACT_GENERATE=0.Written for commit 91587e4. Summary will update on new commits. Review in cubic