argoproj / argoproj/argo-workflows

workflowRestrictions Should Not Effect Cron Workflow Adhoc Runs

Open
#13,993 5 comments 0 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

### Pre-requisites

- [x] I have double-checked my configuration
- [X] 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.
- [X] I have searched existing issues and could not find a match for this bug
- [ ] I'd like to contribute the fix myself (see [contributing guide](https://github.com/argoproj/argo-workflows/blob/main/docs/CONTRIBUTING.md))

### What happened? What did you expect to happen?

For the record I lied on the above prerequisites because they didn't apply. I also did not test on latest because this setting is only true on our more locked down higher environments where I cannot arbitrarily change the service version.

When attempting to submit a cron workflow adhoc, I am unable to do so when workflowRestriction is set.

I don't know if this is a bug report or a feature request, but to me it seems like a bug. IMO the "purpose" of requiring template referencing is to ensure all workflow runs are gated by version control (given that you only allow workflow templates to be created via git/CICD).

running a cron adhoc should serve the same purpose of requiring a workflow to be defined via a resource in the cluster prior to the run.
![Screenshot 2024-12-10 at 2 53 17 PM](https://github.com/user-attachments/assets/6235b61b-febf-4519-b428-8e6b65632bd9)

### Version(s)

v3.5.8

### 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.

```YAML
Any cron workflow should do.
```

### Logs from the workflow controller

```text
N/A
```

### Logs from in your workflow's wait container

```text
N/A
```

Contributor guide

Open the contributing guide

Research direction

No implementation file, test, or reproducible workflow is named. Start by tracing cron workflow ad hoc submission and the workflowRestriction validation, then add focused coverage for the reported case. Done means an ad hoc cron run is accepted when the referenced workflow resource satisfies the intended restriction.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
devops
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.