Skip to content

fix : desired_status backfill in deployments table#8677

Merged
kaspersjo merged 2 commits intomainfrom
deploy_status_backfil
Jan 23, 2026
Merged

fix : desired_status backfill in deployments table#8677
kaspersjo merged 2 commits intomainfrom
deploy_status_backfil

Conversation

@k-anshul
Copy link
Member

@k-anshul k-anshul commented Jan 21, 2026

The desired_status column was added a few releases back where the default desired_status is 0(unspecified).
For deployments that were created before the release the desired_status is set to 0.
In the last release the desired_status of running deployments in normal reconcile operations is set to current desired_status:

func (s *Service) UpdateDeployment(ctx context.Context, depl *database.Deployment, branch string) error {
// Update the deployment with the new branch (or existing branch) and set existing desired status to retrigger reconcile flow

This is leading to reconcile being no-op for many existing deployments.

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!

@k-anshul k-anshul self-assigned this Jan 21, 2026
@kaspersjo kaspersjo merged commit f3cab52 into main Jan 23, 2026
10 checks passed
@kaspersjo kaspersjo deleted the deploy_status_backfil branch January 23, 2026 14:27
k-anshul added a commit that referenced this pull request Jan 24, 2026
* desired status backfill

* observability
k-anshul added a commit that referenced this pull request Jan 24, 2026
* desired status backfill

* observability
k-anshul added a commit that referenced this pull request Feb 2, 2026
* desired status backfill

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants