openworkflowdev / openworkflowdev/openworkflow

Workflow run retention policy

Open
#303 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
TypeScript
Stars
1.3k
Forks
66
Avg merge
1d 1h
Merged PRs (30d)
69

Description

Desired Behavior

It will be nice to have a way to configure retention period and automatically clean up workflows in terminal states without manual intervention, similar to Temporal's History Scavenger.

Possible design
// openworkflow.config.ts

export default defineConfig({
  ...,
  retention: {
    enabled: true,
    period: "30d", // shorthand, any workflow runs in terminal state past 30 days will be removed
  }
});

This is to keep it simple for now. In the future there could be more fine-grained control - e.g. frequency of this job, when to run it, customize what workflow run statuses to clean up.

I think there's a dependency on https://github.com/openworkflowdev/openworkflow/issues/246 before this can be considered.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the dependency in issue #246, then inspect the configuration entry point represented by openworkflow.config.ts and defineConfig. Implement the proposed retention.period and enabled settings so workflow runs in terminal states older than the configured period are removed automatically. Done means the retention behavior can be configured without manual cleanup and matches the stated 30-day example.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.