You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tested with the :latest image tag (i.e. quay.io/argoproj/workflow-controller:latest) and can confirm the issue still exists on :latest. If not, I have explained why, in detail, in my description below.
I have searched existing issues and could not find a match for this bug
When evaluating whether a workflow should be deleted due to maxRetention limits, workflows that have already been deleted by another mechanism (e.g. CronWorkflow successfulJobsHistoryLimit) continue to be counted.
I would expect the maxRetention limit to only count workflows that have not been deleted.
Version(s)
13afac57453f
Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflow that uses private images.
Reduce the maxRetention limits to make it easier to recreate the issuei.e.# Workflow retention by number of workflowsretentionPolicy: | completed: 10 failed: 10 errored: 10Using a simple workflow e.g.apiVersion: argoproj.io/v1alpha1kind: Workflowmetadata:
generateName: hello-world-labels:
workflows.argoproj.io/archive-strategy: "false"annotations:
workflows.argoproj.io/description: | This is a simple hello world example.spec:
entrypoint: hello-worldtemplates:
- name: hello-worldcontainer:
image: busyboxcommand: [echo]args: ["hello world"]run it 10 times and see that the history of all 10 workflows is maintained.Now create a simple CronWorkflow that runs every minute. e.g.apiVersion: argoproj.io/v1alpha1kind: CronWorkflowmetadata:
name: hello-worldspec:
schedule: "* * * * *"timezone: "America/Los_Angeles"# Default to local machine timezonestartingDeadlineSeconds: 0concurrencyPolicy: "Replace"# Default to "Allow"successfulJobsHistoryLimit: 4# Default 3failedJobsHistoryLimit: 4# Default 1suspend: false # Set to "true" to suspend schedulingworkflowSpec:
entrypoint: hello-world-with-timetemplates:
- name: hello-world-with-timecontainer:
image: busyboxcommand: [echo]args: ["🕓 hello world. Scheduled on: {{workflow.scheduledTime}}"]Let this run and observe that once the workflows created by this CronWorkflow begin to be removed by the successfulJobsHistoryLimit (in this case 4), they are still considered when evaluating maxRetention.
Logs from the workflow controller
time="2025-01-14T20:55:10.046Z" level=info msg="Workflow to be dehydrated" Workflow Size=1542
time="2025-01-14T20:55:10.060Z" level=info msg="Workflow update successful" namespace=argo phase=Succeeded resourceVersion=17686 workflow=hello-world-1736888100
--> time="2025-01-14T20:55:10.061Z" level=info msg="Queueing Succeeded workflow argo/hello-world-tjsjx for delete due to max rention(10 workflows)" <-- At this point there are not 10 workflows
time="2025-01-14T20:55:10.061Z" level=info msg="Deleting garbage collected workflow 'argo/hello-world-tjsjx'"
time="2025-01-14T20:55:10.061Z" level=info msg="Queueing Succeeded workflow argo/hello-world-1736888100 for delete in 24h0m0s due to TTL"
time="2025-01-14T20:55:10.072Z" level=info msg="Successfully request 'argo/hello-world-tjsjx' to be deleted"
Logs from in your workflow's wait container
N/A for this issue
The text was updated successfully, but these errors were encountered:
Pre-requisites
:latest
image tag (i.e.quay.io/argoproj/workflow-controller:latest
) and can confirm the issue still exists on:latest
. If not, I have explained why, in detail, in my description below.What happened? What did you expect to happen?
When evaluating whether a workflow should be deleted due to
maxRetention
limits, workflows that have already been deleted by another mechanism (e.g. CronWorkflowsuccessfulJobsHistoryLimit
) continue to be counted.I would expect the
maxRetention
limit to only count workflows that have not been deleted.Version(s)
13afac57453f
Paste a minimal workflow that reproduces the issue. We must be able to run the workflow; don't enter a workflow that uses private images.
Logs from the workflow controller
Logs from in your workflow's wait container
The text was updated successfully, but these errors were encountered: