argoproj / argoproj/argo-workflows
Circuit Breakers for CronWorkflows
- Dominant language
- Go
- Stars
- 17k
- Forks
- 3.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 138
Description
# Summary
What change needs making?
Implement a circuit breaker for cron workflows. For example, if a workflow has had multiple failures in a row, pause the workflow automatically. Or pause the workflow after a certain number of executions (https://github.com/argoproj/argo-workflows/issues/7201).
Either an expression:
```yaml
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: hello-world
spec:
schedule: "* * * * *"
backOff: "{{cronworkflow.failures}} > 3"
```
Or a field:
```yaml
apiVersion: argoproj.io/v1alpha1
kind: CronWorkflow
metadata:
name: hello-world
spec:
schedule: "* * * * *"
backOff:
failures: 2
```
# Use Cases
When would you use this?
Cron workflows are the only CRD that act on their own (i.e. no explicit action is needed to spawn workflows from cron workflows), so a circuit breaker could be useful.
---
**Message from the maintainers**:
Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.
Contributor guide
Research direction
Start by locating the CronWorkflow CRD and the code that schedules it; the issue names no files or tests. Compare the proposed expression and field approaches, then define how consecutive failures or execution counts trigger pausing and how completion can be verified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- devops
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100