Skip to content

fix: Count a drift once when the ClusterSummary update conflicts - #2078

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:fix-total-drifts-counted-once
Oct 31, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:fix-total-drifts-counted-once

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

processResourceSummary called trackDrifts inside the RetryOnConflict closure, before the ClusterSummary status update. Every Conflict ran the closure again, so projectsveltos_total_drifts was incremented again for the same drift.

Collect the drifted features in the closure and count them once the update has succeeded.

Fixes #2075

@gianlucam76
gianlucam76 force-pushed the fix-total-drifts-counted-once branch from 8285267 to ca8a6f7 Compare October 30, 2026 21:15
processResourceSummary called trackDrifts inside the RetryOnConflict
closure, before the ClusterSummary status update. Every Conflict ran the
closure again, so projectsveltos_total_drifts was incremented again for
the same drift.

Collect the drifted features in the closure and count them once the
update has succeeded.

Fixes projectsveltos#2075
@gianlucam76
gianlucam76 force-pushed the fix-total-drifts-counted-once branch from ca8a6f7 to 0450dde Compare October 30, 2026 21:25
@gianlucam76
gianlucam76 merged commit 15e7ec3 into projectsveltos:main Oct 31, 2026
12 checks passed
@gianlucam76
gianlucam76 deleted the fix-total-drifts-counted-once branch October 31, 2026 06:07
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.

BUG: total_drifts counts one drift again on every ClusterSummary status update conflict

1 participant