Skip to content

Make sequential snapin execution opt-in by default#826

Merged
mastacontrola merged 7 commits into
working-1.6from
copilot/sequential-snapin-execution
Jun 14, 2026
Merged

Make sequential snapin execution opt-in by default#826
mastacontrola merged 7 commits into
working-1.6from
copilot/sequential-snapin-execution

Conversation

Copilot AI commented Jun 14, 2026

Copy link
Copy Markdown

Sequential snapin execution was being applied by default, but this behavior should remain off for the new snapin ordering feature unless explicitly enabled. This keeps existing multi-snapin behavior intact while preserving ordered execution for opt-in sequential runs.

  • Behavior change

    • Gate one-at-a-time snapin dispatch behind the existing abortOnFail / sequential tasking flag.
    • Preserve legacy behavior when the flag is off by returning all eligible snapins in a single response.
  • Sequential execution path

    • Keep per-response single-snapin delivery when sequential execution is enabled.
    • Retain the failure-stop behavior for ordered runs so later snapins are not dispatched after an earlier failure.
  • Implementation

    • Update SnapinClient to conditionally break after the first queued snapin only when sequential mode is enabled.
$dispatchSequentially = (bool)$SnapinJob->get('abortOnFail');

if ($dispatchSequentially) {
    break;
}

Copilot AI changed the title [WIP] Add sequential execution with stop-on-failure and logging Add ordered snapin queues with optional abort-on-failure and failure-context logging Jun 14, 2026
Copilot AI requested a review from mastacontrola June 14, 2026 14:52
Copilot AI changed the title Add ordered snapin queues with optional abort-on-failure and failure-context logging Make sequential snapin execution opt-in by default Jun 14, 2026
@mastacontrola mastacontrola marked this pull request as ready for review June 14, 2026 15:21
@mastacontrola mastacontrola merged commit 456f016 into working-1.6 Jun 14, 2026
@mastacontrola mastacontrola deleted the copilot/sequential-snapin-execution branch June 14, 2026 15:26
mastacontrola added a commit that referenced this pull request Jun 14, 2026
The sequential-snapin feature (#824/#826) added the abort-on-failure and
ordering plumbing but two gaps remained:

- FOG_SCHEMA was never bumped, so the migration adding sjAbortOnFail /
  stSequence never ran and the new code INSERTed against missing columns.
- There was no UI to actually set the run order; stSequence was only ever
  auto-derived from association order.

This adds real per-host ordering:

- schema: add snapinAssoc.saSequence (folded into migration 294) and bump
  FOG_SCHEMA to 294 so the snapin migration applies on upgrade.
- SnapinAssociation: expose the sequence field.
- Host: loadSnapins() orders by sequence; addSnapin() appends new snapins
  after existing ones; new setSnapinOrder() persists a chosen order.
- Group: tasking reads each member host's snapins in sequence order.
- Host page: a "Snapin Run Order" panel (up/down + Save) on the Snapins
  tab, backed by a getSnapinOrderList endpoint.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.

Sequential Snapin execution with stop-on-failure and logging

2 participants