NAME

Developer::Dashboard::UpdateManager - managed update runner

SYNOPSIS

my $updater = Developer::Dashboard::UpdateManager->new(...);
my $steps = $updater->run;

DESCRIPTION

This module executes repository update scripts while coordinating managed collector shutdown and restart around the update process.

METHODS

new, updates_dir, run

Construct and execute dashboard updates.

PURPOSE

This module runs the ordered update hook chain for dashboard update. It discovers executable update scripts, runs them in sorted order, streams their stdout and stderr, updates the structured RESULT state between hooks, and coordinates collector stop/start around the update window.

WHY IT EXISTS

It exists because update hooks are a first-class runtime workflow, not a one-off shell loop. The dashboard needs one module that owns ordering, streaming, structured hook results, and collector lifecycle around updates.

WHEN TO USE

Use this file when changing update hook discovery, update streaming behavior, RESULT propagation between update hooks, or the way updates stop and restart collectors.

HOW TO USE

Construct it with the file registry, path registry, and collector runner, then call its run method from the update command. Keep update hook execution policy in this module rather than in the command wrapper.

WHAT USES IT

It is used by the dashboard update flow, by runtime bootstrap/update smoke tests, and by coverage that verifies update hook ordering and collector restart semantics.

EXAMPLES

Example 1:

perl -Ilib -MDeveloper::Dashboard::UpdateManager -e 1

Do a direct compile-and-load check against the module from a source checkout.

Example 2:

prove -lv t/04-update-manager.t t/26-sql-dashboard.t

Run the focused regression tests that most directly exercise this module's behavior.

Example 3:

HARNESS_PERL_SWITCHES=-MDevel::Cover prove -lr t

Recheck the module under the repository coverage gate rather than relying on a load-only probe.

Example 4:

prove -lr t

Put any module-level change back through the entire repository suite before release.