Skip to content

Add completion-time filter (completed_after/completed_before) to workflow list API #1143

Description

@Seungu5

What new feature or improvement would you like to see?

Summary
The workflow list API supports filtering by submission time (submitted_after) but has no equivalent filter for completion time. As a result, any "completed within window X" query has to be approximated by submission time, which is incorrect for long-running workflows. The UI "Completed (24h)" dashboard card is the most visible symptom of this gap.

Current behavior (symptom)

  • The "Completed (24h)" dashboard card filters workflows using a submission-time parameter, not a completion-time parameter.
  • A workflow submitted >24h ago but completed within the last 24h is excluded from the card, and a workflow submitted within 24h but still running can be miscounted depending on status handling.
  • There is no API query parameter to filter by completion time at all, so this cannot be worked around client-side without pulling the full list and filtering locally.

Root cause
The workflow list/query endpoint exposes only submission-time filtering. There is no completed_after / completed_before parameter, and (to confirm) the underlying schema may not expose a queryable, indexed completion timestamp.

Proposed solution

  1. API – add completed_after / completed_before query parameters to the workflow list endpoint, mirroring the existing submitted_after semantics (UTC timestamps).
  2. DB / query – filter on the workflow completion timestamp. If a queryable completion-time column does not already exist (or is only derivable from a status-transition event), add/expose one with an appropriate index.
  3. UI – switch the "Completed (Nh)" dashboard card from the submission-time filter to completed_after.
  4. CLI (optional, for consistency) – osmo workflow list --completed-after / --completed-before.

Environment

  • OSMO version: <1.2.1>
  • Deployment: Kubernetes (EKS), backend orchestration via OSMO

Willing to contribute
Happy to implement this

Why is this needed?

Impact

  • Dashboard "Completed (Nh)" metrics are inaccurate for any workload whose runtime exceeds the window — common for training/sim jobs.
  • Operators cannot answer "what completed in the last N hours" via API/CLI, which affects reporting, alerting, and capacity review.

Code of Conduct

  • I agree to follow NVIDIA OSMO's Code of Conduct
  • I have searched the open feature requests and have found no duplicates for this feature request

Activity

  1. Seungu5 commented on Jun 25, 2026

    @Seungu5
    Author

    @NVIDIA/osmo-dev happy to implement this. One design question before I open a PR:

    • Does the schema already store a completion timestamp that's queryable+indexed, or is a migration required?
    • Should completed_* and submitted_* filters be combinable in one query?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    externalThe author is not in @NVIDIA/osmo-dev

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions