argoproj / argoproj/argo-workflows
Typo in optional parameter causes ignore without error
- Dominant language
- Go
- Stars
- 17k
- Forks
- 3.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 138
Description
# Summary
My team regularly runs into a scenario where we've introduced a typo into our `argo submit` command causing a parameter with a default to be ignored silently. For example, if we have a template that starts with
```yaml
templates:
- name: training
inputs:
parameters:
- name: training_config
- name: training_data_config
- {name: memory, value: 6Gi}
```
and then submit the workflow using
```bash
argo submit --from workflowtemplate/training \
-p training_config="$( yq . training.yaml )" \
-p training_data_config="$( yq . train-data.yaml )" \
-p mem="15Gi" \
```
the workflow will be submitted with memory=6Gi. Because the failure is silent, this has cost us multiple developer days trying to diagnose e.g. why our workflow is running out of memory, or in another case why our training run is not showing validation metrics.
What we'd ideally like to have happen is that our command or at least the job errors out. We've considered writing a wrapper command that validates parameters, but there does not appear to be a way to get the list of parameters for a given template.
I would propose that unused parameters cause an error, but I understand this could be a highly disruptive breaking change for e.g. the case where a user passes the same parameters to multiple templates which don't each use all of them. It would be nice to
- have a command which validates a parameters file against a workflow to ensure that it contains no unused parameters, or
- have a command which returns the list of parameters for a given workflow
We can also work around the issue by making all parameters required, but this is not ideal.
# Use Cases
When submitting our runs, we would put parameters in a parameters file, and validate that parameters file in our bash submission script we use before it runs `argo submit`.
---
**Message from the maintainers**:
Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.
Contributor guide
Research direction
Start from the `argo submit` entry point and the workflow-template parameter handling described in the examples. Reproduce the typo case with the shown parameters file or command, then compare the requested validation and parameter-list behaviors. Done means the chosen behavior detects or reports unused or misspelled parameters without breaking the stated multi-template use case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go, kubernetes
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100