Skip to content

[addon-operator] create module hook queues regardless of DoModuleStartup - #826

Merged
ldmonster merged 2 commits into
release-1.21from
fix/module-hook-queues-without-startup-1.21
Aug 21, 2026
Merged

[addon-operator] create module hook queues regardless of DoModuleStartup#826
ldmonster merged 2 commits into
release-1.21from
fix/module-hook-queues-without-startup-1.21

Conversation

@Fkuloff

@Fkuloff Fkuloff commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Overview

Backport of #825 to release-1.21, with the pkg/task/tasks/module-run/task.go part of #797 that never reached this branch: the Startup phase no longer branches on hm.DoModuleStartup, QueueSynchronizationTasks re-ensures the queues, and a Synchronization task that cannot be queued fails the phase instead of being dropped.

What this PR does / why we need it

modules.Startup is set only in the BasicModule constructor and in ResetState, so a module in that phase has not completed its startup. DoModuleStartup duplicates that state and every ModuleRun producer computes it independently: converge sets it only for modules in ModulesToEnable (converge-modules/task.go:155), functional.Scheduler.Add replaces a stored request wholesale, and PushRunModuleTask never sets it.

A module that took such a task created no hook queues and ran no onStartup hooks, and got neither back because modules.Startup is not re-entered. Its Synchronization tasks were dropped, the empty SynchronizationState reported IsCompleted() == true, and the chart was applied without the values those hooks were to fill.

Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
@Fkuloff Fkuloff added the bug Something isn't working label Aug 21, 2026
Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
@ldmonster
ldmonster merged commit bc5184c into release-1.21 Aug 21, 2026
5 of 6 checks passed
@ldmonster
ldmonster deleted the fix/module-hook-queues-without-startup-1.21 branch August 21, 2026 16:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants