Argo: Argo CLI - argo delete --older no longer works

Created on 7 Aug 2020  路  5Comments  路  Source: argoproj/argo

Summary

--older flag in argo delete no longer works. It used to work with previous versions of argo CLI/ argo controller

Diagnostics

Argo v2.9.2
Argo CLI - v2.9.2

Please refer below:

image



Message from the maintainers:

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

bug regression workaround

Most helpful comment

Will take a look

All 5 comments

Will take a look

Thanks @simster7 , also one issue(unrelated, because of which we resorted to a cron workflow that does cleanup with argo delete --older).

The successfulJobsHistoryLimit, failedJobsHistoryLimit with cron workflow is not working for us. I tested with simple cron workflows and works fine. But, in our cron, we are calling workflow templates using templateRef which in turn calls for another workflow template using templateRef that has the container definition. Could this nesting be causing the issue? Here's the snippet for cron:

image

I said I would look into this as I thought there was a test in place. The test does not fail because TestWorkflowDeleteOlder runs argo delete --older 0s -l argo-e2e and has the label flag, so passes:

This tells us the workaround for this:

argo delete --older 0s -l '!foo'

i.e. run the command with l and a label that does not exist

I said I would look into this as I thought these was a test in places is because the test TestWorkflowDeleteOlder runs argo delete --older 0s -l argo-e2e and therefore has a label flag.

This happens because the presence of a label flag passes this if condition and applies the delete opts.

https://github.com/argoproj/argo/blob/6134a56540e9bbb744fe06ce5be69eca99e95b32/cmd/argo/commands/delete.go#L48-L49

The successfulJobsHistoryLimit, failedJobsHistoryLimit with cron workflow is not working for us. I tested with simple cron workflows and works fine. But, in our cron, we are calling workflow templates using templateRef which in turn calls for another workflow template using templateRef that has the container definition

Looking into this

Could this nesting be causing the issue?

I don't think so. Can you open a new issue and provide a sample workflow to reproduce?

Was this page helpful?
0 / 5 - 0 ratings