Skip to content

Requeue ClusterSummaries waiting on dependsOn instead of waiting for the poll - #2110

Merged
gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:requeue-dependsOn-waiters
Nov 20, 2026
Merged

gianlucam76 merged 1 commit into
projectsveltos:mainfrom
gianlucam76:requeue-dependsOn-waiters

Conversation

@gianlucam76

Copy link
Copy Markdown
Member

A ClusterSummary blocked on a dependsOn prerequisite (deploy), or a prerequisite waiting for its dependents to be removed (delete), only noticed the change at its next 10 second poll, adding up to 10 seconds per dependency level.

When a ClusterSummary becomes Provisioned, its dependents (found through the dependency manager, new GetDependents) are requeued: the in-memory cooldown is expired and the retrigger annotation is updated, so no new watch is needed.

When a ClusterSummary is removed, the ClusterSummaries of the profiles it depends on are requeued if they are being deleted: their DeletedInstances entry is cleared and the retrigger annotation is updated.

Both are done after the status change has been persisted, so the requeued ClusterSummaries do not read stale state from the cache. With --auto-deploy-dependencies=false the dependency manager tracks nothing and dependents fall back to the poll on deploy; the delete side reads dependsOn directly and is not affected.

Measured on 6 fake clusters: a dependent finishes 10s after its prerequisite instead of 19-20s; on delete the prerequisite is removed 15s after its dependent instead of 19-21s, and the whole delete takes 30s instead of 55s.

…the poll

A ClusterSummary blocked on a dependsOn prerequisite (deploy), or a
prerequisite waiting for its dependents to be removed (delete), only noticed
the change at its next 10 second poll, adding up to 10 seconds per dependency
level.

When a ClusterSummary becomes Provisioned, its dependents (found through the
dependency manager, new GetDependents) are requeued: the in-memory cooldown is
expired and the retrigger annotation is updated, so no new watch is needed.

When a ClusterSummary is removed, the ClusterSummaries of the profiles it
depends on are requeued if they are being deleted: their DeletedInstances
entry is cleared and the retrigger annotation is updated.

Both are done after the status change has been persisted, so the requeued
ClusterSummaries do not read stale state from the cache. With
--auto-deploy-dependencies=false the dependency manager tracks nothing and
dependents fall back to the poll on deploy; the delete side reads dependsOn
directly and is not affected.

Measured on 6 fake clusters: a dependent finishes 10s after its prerequisite
instead of 19-20s; on delete the prerequisite is removed 15s after its
dependent instead of 19-21s, and the whole delete takes 30s instead of 55s.
@gianlucam76
gianlucam76 merged commit 25faccc into projectsveltos:main Nov 20, 2026
23 of 24 checks passed
@gianlucam76
gianlucam76 deleted the requeue-dependsOn-waiters branch November 20, 2026 09:20
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.

1 participant