Skip to content

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

Merged
ldmonster merged 2 commits into
mainfrom
fix/module-hook-queues-without-startup
Aug 24, 2026
Merged

[addon-operator] create module hook queues regardless of DoModuleStartup#825
ldmonster merged 2 commits into
mainfrom
fix/module-hook-queues-without-startup

Conversation

@Fkuloff

@Fkuloff Fkuloff commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Overview

The Startup phase of ModuleRun no longer branches on hm.DoModuleStartup: a module in that phase always has its hook queues created and its onStartup hooks executed.

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>
Signed-off-by: Artem Kuleshov <artem.kuleshov@flant.com>
@ldmonster
ldmonster merged commit 4fda3e5 into main Aug 24, 2026
8 of 9 checks passed
@ldmonster
ldmonster deleted the fix/module-hook-queues-without-startup branch August 24, 2026 11:46
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