Skip to content

Move resource checks to deployment reconciliation#9653

Open
kaspersjo wants to merge 1 commit into
mainfrom
add-check-reconcile-deployment
Open

Move resource checks to deployment reconciliation#9653
kaspersjo wants to merge 1 commit into
mainfrom
add-check-reconcile-deployment

Conversation

@kaspersjo

Copy link
Copy Markdown
Contributor

Move deployment resource checks into the deployment reconciliation logic to prevent race conditions.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

@nishantmonu51 nishantmonu51 added Type:Improvement Team:Platform Platform Working Group Size:M Medium change: 100-499 lines labels Jul 6, 2026
@nishantmonu51

Copy link
Copy Markdown
Collaborator

@codex: review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

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.

Reviewed commit: a5a533a5e2

ℹ️ 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".

Comment thread admin/deployments.go
Comment on lines +543 to +546
if reflect.DeepEqual(desiredArgs, currentArgs) {
// No provisioning args changed. Run a drift-aware health check of the deployment's provisioner
// resources instead of reprovisioning.
err = s.CheckDeploymentInner(ctx, d)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Reprovision when annotations-only updates occur

When a project update only changes annotations (admin/projects.go marks oldProj.Annotations as deployment-impacting), the desired/current RuntimeArgs are equal, so this new branch calls CheckDeploymentInner instead of provisionRuntime. The Kubernetes check only triggers reprovision for version/template/org plan/custom domain drift (admin/provisioner/kubernetes/kubernetes.go), so templates that consume project annotations via DeploymentAnnotations keep the old rendered values even though UpdateDeploymentsForProject scheduled reconciliation; before this change provisionRuntime always reapplied them.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Size:M Medium change: 100-499 lines Team:Platform Platform Working Group Type:Improvement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants