Replies: 5 comments
|
@JBBianchi You are perfectly right! While this was intended to simplify expressions for named arguments, this obviously does not work for un-named arguments and flags. Your proposal therefore makes asbolute sense. I would, however, delay your proposal until we finally addressed the many problems inherent to the
|
|
I am currently doing it like so, and it seems more in line with run.script and run.container too. Workflow Spec and it outputs a multiline script like so in the runtime... which I then execute (I use a container as the default choice for my runtime)!! this seems very intuitive to me!! Alternatively, instead of having a separate arguments and command in the shell spec, we could just make command as a string array! |
|
@JBBianchi +1. Also alignes with k8s API pretty nicely: https://kubernetes.io/docs/tasks/inject-data-application/define-command-argument-container/#define-a-command-and-arguments-when-you-create-a-pod apiVersion: v1
kind: Pod
metadata:
name: command-demo
labels:
purpose: demonstrate-command
spec:
containers:
- name: command-demo-container
image: debian
command: ["printenv"]
args: ["HOSTNAME", "KUBERNETES_PORT"]
restartPolicy: OnFailure |
|
Hello, I just finished the implementation of run script and run shell for Lemline. IMHO having a list of String makes more sense as this is what I use eventually : "command arg1 arg2 arg3" As @hirenr pointed out, it could also be a single expression. But the initial post says "this structure makes sense for run:script" - I do not understand why actually, as in my implementation arguments end up as a list of string as well. My understanding is that the documentation is a bit too vague to explicit if those arguments are actually... arguments to handle in the code (in that cases it should be a list) or variables in the code (in that case it should be a map, but the name may need to change) |
|
Hi, I just pushed a PR that addresses this among a larger rationalisation for run:* tasks.
|
Uh oh!
There was an error while loading. Please reload this page.
Hello, dear community,
I'd like to bring up a small concern regarding the definition of run:shell.
Currently, the
argumentsproperty is defined as a map:While this structure makes sense for run:script, where arguments represent a set of variables and their values, shell command arguments are typically an array, not a key-value map.
To align with common usage and improve clarity, I propose updating the documentation and schema for
run:shell:argumentsto use an array instead of a map. Additionally, the documentation forrun:script:argumentsshould be adjusted, as it currently describes the property as:This should be corrected to:
I’d love to hear your thoughts on this! Would this be an acceptable improvement to better reflect expected behavior?
Looking forward to your feedback!
All reactions