argoproj / argoproj/argo-workflows

Proposal: Automatically suspend CronWorkflow for repeated errors in child workflows

Open
#5,659 8 comments 5 reactions 0 assignees View on GitHub
area/cron-workflows
Dominant language
Go
Stars
17k
Forks
3.7k
Avg merge
1d 20h
Merged PRs (30d)
138

Description

# Summary

What change needs making?

Automatically suspend a CronWorkflow for repeated errors in its workflows.

# Use Cases

When would you use this?

When there are repeated errors observed in the child workflows, future child workflows would likely also fail. In this case, the controller could automatically suspend CronWorkflow from submitting new child workflows to avoid waste of computational resources.

Implementation =-wise, we could:
1. Introduce a field `suspendFailedJobsLimit bool` (probably need a better name) in CronWorkflow to specify the maximum number of consecutive failed workflows before we suspend the corresponding CronWorkflow.
1. Record statuses of child workflows in CronController.
1. Suspend the corresponding CronWorkflow when the threshold is reached.

---

**Message from the maintainers**:

Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.

Contributor guide

Open the contributing guide

Research direction

Start by locating the CronWorkflow definition and the CronController entry point, then trace how child-workflow statuses are observed. Done means the failure threshold, consecutive-failure tracking, and suspension behavior are specified and covered by tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
backend, devops
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.