Skip to content

Singleton guard: show 'skipped (singleton)' as distinct status in execution history #75

Description

@csoscd

Summary

When a job is skipped because a previous instance is still running (singleton guard), no entry appears in the execution history. This makes it impossible to tell from the UI whether a job ran, failed, or was silently skipped.

Proposed Behaviour

A distinct "Skipped (singleton)" entry should appear in the execution history and timeline whenever a job is suppressed by the singleton guard, including a timestamp and — if available — the PID of the still-running instance.

Affected Component

  • cron-wrapper.sh
  • Agent
  • Web UI

First Implementation Idea

  1. New exit code constant — introduce exit code -6 ("Skipped – singleton") alongside the existing -5 ("Interrupted").
  2. cron-wrapper.sh — when the singleton check detects a running instance, instead of silently exiting, call POST /execution/start immediately followed by POST /execution/finish with exit code -6 and a short output message (e.g. "Skipped: previous instance still running (PID 1234)").
  3. AgentExecutionFinishEndpoint maps exit code -6 to status label "skipped_singleton"; no retry or notification is triggered for this status.
  4. Web UI — history list and timeline render a distinct badge (e.g. grey "Skipped") for this status, visually separate from success, failure, and interrupted.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions