argoproj / argoproj/argo-workflows
resume or stop completed workflow should throw exception
- Dominant language
- Go
- Stars
- 17k
- Forks
- 3.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 138
Description
## Checklist
* [x] Double-checked my configuration.
* [x] Tested using the latest version.
* [ ] Used the Emissary executor.
## Summary
What happened/what you expected to happen?
Happened: when I called argo workflow resume and stop api towards a completed workflow, it didn't panic, and if I turn to call it with suspend or retry, it would complains sth like:
```
workflow must be Failed/Error to retry
```
```
timed out waiting for the condition: cannot suspend completed workflows
```
Expected: we should also throw exception while we resume or stop a completed workflow.
What version are you running?
v3.2.7
## Diagnostics
Paste the smallest workflow that reproduces the bug. We must be able to run the workflow.
```yaml
```
```bash
# Logs from the workflow controller:
kubectl logs -n argo deploy/workflow-controller | grep ${workflow}
# If the workflow's pods have not been created, you can skip the rest of the diagnostics.
# The workflow's pods that are problematic:
kubectl get pod -o yaml -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded
# Logs from in your workflow's wait container, something like:
kubectl logs -c wait -l workflows.argoproj.io/workflow=${workflow},workflow.argoproj.io/phase!=Succeeded
```
---
**Message from the maintainers**:
Impacted by this bug? Give it a 👍. We prioritise the issues with the most 👍.
Contributor guide
Research direction
Start at the Argo workflow resume and stop API entry points, then compare their handling with the existing suspend and retry behavior described in the issue. Confirm that calling resume or stop on a completed workflow is rejected with a clear exception, consistent with the existing completed-workflow checks.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100