using `--args` with `run` command does overwrite `--executor-args`
reissseb opened this issue · 2 comments
Describe the bug
Using a custom image with the container executor to run a Python
script.
The values specified with --executor-args
are overwritten with the values of --args
when adding them during the run
command like this:
testkube create test test-name --file test_script.py` --executor-args "--arg1 value1" --type python/test
teskube run test test-name --arg "--new-arg new-value"
Adding --args-mode append
does overwrite the argument as well.
testkube get execution test-name-1
(run without --args
does print the initial arguments in the Args
field.
testkube get execution test-name-2
(run with --args
does print only the new/added arguments in the Args
field. The initial arguments are missing.
To Reproduce
- create a simple Python script that prints CLI arguments
- use a
Python
Docker image - create test with `testkube create test test-name --executor-args "--arg1 value1" --file [...]
- run test without
--args
:value1
should be printed - run test with
--args value2
: onlyvalue2
is printed,value1
is missing
Expected behavior
--args
should append the specified argument to the existing --executor-args
arguments by default.
Version / Cluster
- Which testkube version?
1.17.2
- What Kubernetes cluster? custom setup
- What Kubernetes version?
1.28.2
hey @reissseb it's expected behaivour at the moment. we use ArgsMode only for executor args. it's not used for run command. the idea is to use eitther run args, or test args, but not together
@tkonieczny guess it will be confusing and break existing usage