Repository navigation
Conversation
The operator treated an attached limit named deployment:<id> as the deployment's own limit. A shared limit with that name was then deleted when the PrefectDeployment was deleted, because Prefect deletes the limit attached to a deployment it deletes. The operator now records the ID of the limit Prefect creates for spec.deployment.concurrencyLimit in status.concurrencyLimitId. It clears or rewrites only that limit and detaches any other. A status saved before this field existed has no ID. For those, a limit named after the deployment counts as its own if the last sync set concurrencyLimit. Related to #431. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This was referenced Dec 2, 2026
gaker
marked this pull request as ready for review
December 2, 2026 03:30
zangell44
approved these changes
Dec 2, 2026
This branch has not been deployed
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.
Closes #431
The problem. The operator treated an attached limit named
deployment:<id>as the deployment's own concurrency limit. Prefect gives that name to the limit it creates forconcurrency_limit, but a user can create a shared limit with the same name. Deleting the PrefectDeployment then deleted that shared limit, because Prefect deletes the limit attached to a deployment it deletes. Removing it from the spec left it attached.The fix. After a sync that sets
concurrencyLimit, the operator records the ID of the limit Prefect created instatus.concurrencyLimitId. It clears or rewrites only that limit, and detaches any other limit before deleting the deployment.A status saved by an earlier operator version has no ID. For those resources, a limit named after the deployment counts as its own if the last sync set
concurrencyLimitinstatus.appliedFields. Prefect limit names are unique, so a shared limit can't have that name while the own limit exists.The operator records the ID right after the Prefect update, before the schedule sync. A failed sync saves the status too, so the next sync still has the ID.
Rollout caveats
no-op: the CRD adds one optional status field. Existing resources record it on their next sync.Session context
Codex raised this in review of #428. This is the bottom of a three-PR stack: #433 deletes a detached own limit by this ID, and #434 extends the name rule to deployments the operator adopts. Each new test fails with the name-based check restored.
🤖 Generated with Claude Code