argoproj / argoproj/argo-workflows
CLI doesn't respect workflow defaults when validation is run
- 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?
`NewWorkflowServiceClient` calls `NewWorkflowServer` with a nil value for the workflow defaults.
This means that the server spun up for cli connection differs in behaviour to an actual running server.
This results in workflows such as this:
```yaml
data:
config: |
artifactRepository: { ... }
workflowDefaults:
spec:
arguments:
parameters:
- name: G-image-alpine
value: someregistry.azurecr.io/alpine:3.21
```
```yaml
apiVersion: argoproj.io/v1alpha1
kind: Workflow
metadata:
generateName: pstemmet-test-workflow-
namespace: argo
spec:
entrypoint: main
templates:
- name: main
container:
image: '{{workflow.parameters.G-image-alpine}}'
command: ["/bin/sh", "-c"]
args:
- "echo 'Hello, world!'"
```
Working on one submission path but not the other.
### Version(s)
:latest
### 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
N/A
```
### Logs from the workflow controller
```text
N/A
```
### Logs from in your workflow's wait container
```text
N/A
```
Contributor guide
Research direction
Start by tracing NewWorkflowServiceClient and the NewWorkflowServer call it makes, focusing on how workflow defaults are passed during CLI validation. Compare that path with a running server using the workflowDefaults example; done means validation and submission apply the same defaults.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100