argoproj / argoproj/argo-workflows

resume or stop completed workflow should throw exception

Open
#8,173 2 comments 0 reactions 0 assignees View on GitHub
area/api area/suspend-resume
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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.