Device removal, execution stagger and a live run dashboard #20
Reference in New Issue
Block a user
Delete Branch "dev"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Device removal with short-lived agent credentials, execution stagger, and a live run dashboard.
Device removal
devices.removepermission, which only Admin has by default.TlsSkipVerify.Execution stagger
Live run dashboard
GET /api/executions/{runId}/breakdown). Tiles, exit codes and errors all filter the device table.Fixes
LiveDeployment, which never rendered.Behaviour changes
exit 5now fails the job with code 5 (it reported Succeeded/0). A native command's non-zero exit no longer fails a job by itself, and an error silenced with-ErrorAction SilentlyContinueno longer fails it.Jobs.Statetonvarchar(450)so it can be indexed. EF flags this as possible data loss; the values are short state names.Testing
🤖 Generated with Claude Code
StaggerSeconds and StaggerBatchSize spread a run's starts: slots = ceil(targets / batch), slot i at i × spread ÷ (slots − 1), the first at once. The order is shuffled by a hash of (run, device). Each job gets a fixed NotBeforeUtc and stays Queued ("waiting") until a new JobDispatcher on the SCHEDULE_WORKER node sends it. All jobs are written in one save, so a run starts at once however many devices it has. A run with one slot or no spread takes the old path. The run keeps a Data Protection sealed snapshot (script, prelude, parameters, arguments, bindings), so every device runs what was started; secrets and presigned URLs are prepared afresh for each pass and never stored. The snapshot is cleared once nothing is left to send. OnlineOnly is checked again at the slot: a device offline by then becomes skipped, and its job row goes. - POST /api/executions/{runId}/cancel-waiting, jobs.run and scoped, audited. - Counts gain Waiting and TimedOut; targets gain NotBeforeUtc and the detail ServerTimeUtc. A run with only skips left can still be opened and listed. - Schedules store the same two settings and apply them per firing. - A publish that fails no longer leaves a job Queued forever: the dispatcher retries it, for 24 hours. Prepare failures are retried for 5 minutes. - Dispatched is recorded only from Queued, so it cannot overwrite a fast agent's Running or a cancel. - JobStatePayload's error details land in new job columns; job.state relays to browsers carry the RunId. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>GET /api/executions/{runId}/breakdown (jobs.view, scoped): exit-code counts, failed jobs grouped by exception type and first line (position text and paths cut, up to five sample devices, every job id) and finished jobs by outcome in buckets sized to the run. Jobs from older agents fall back to their summary, then their first Error-stream line. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>