`ARGO_LOG_LEVEL` has no effect
Closed this issue ยท 12 comments
If I set:
- name: controller
env:
- ARGO_LOG_LEVEL=debug
in argo-workflows' tasks.yaml file, it seems to have no effect. (I haven't tried the other environment variables.)
WFM?
Can you try this:
apiVersion: kit/v1
kind: Tasks
metadata:
name: kit
spec:
semaphores:
two: 2
tasks:
- name: test
command: sh -c "echo FOO=$FOO"
env:
- FOO=bar
CI=1 kit test
You should see:
โ test running FOO=bar
yes, I see something similar at least:
jvogelman@macos-VF3V14X2QJ test % CI=1 kit test
2023/10/09 17:59:05 tag=v0.1.5
2023/10/09 17:59:05 isTerminal=true, isCI=true
2023/10/09 17:59:05 tasks: [{test <nil> <nil> sh -c echo FOO=$FOO [FOO=bar] [] [] false }]
2023/10/09 17:59:05 semaphores=&{0xc000268c60 map[two:2]}
2023/10/09 17:59:05 test: starting process
2023/10/09 17:59:05 test: resetting process
2023/10/09 17:59:05 test: running process
2023/10/09 17:59:05 test: starting process "sh -c echo FOO=$FOO"
2023/10/09 17:59:05 test: started process "sh -c echo FOO=$FOO": <nil>
2023/10/09 17:59:05 test: getting pgid for 98388
2023/10/09 17:59:05 test: pgid for 98388 is 98388 <nil>
2023/10/09 17:59:05 test: waiting for process 98388 pgid 98388 ("sh -c echo FOO=$FOO")
test: FOO=bar
2023/10/09 17:59:05 test: process exited 98388: <nil>
2023/10/09 17:59:05 test: starting downstream tasks
2023/10/09 17:59:05 test: context cancelled, stopping process
2023/10/09 17:59:05 test: stopping process 98388
2023/10/09 17:59:05 test: finding process 98388
2023/10/09 17:59:05 test: terminating process 98388
2023/10/09 17:59:05 test: waiting 3s before killing 98388
if it works for you and not for me, maybe I'm on an old version?
It could be something subtle going on, e.g. typo in name?
Try a newer version and see if you can repro in a Codespace.
confirmed it is newest version I'm running:
jvogelman@macos-VF3V14X2QJ argo-workflows % which kit
/usr/local/bin/kit
jvogelman@macos-VF3V14X2QJ argo-workflows % ls -l /usr/local/bin/kit
lrwxr-xr-x 1 jvogelman admin 28 Oct 9 18:06 /usr/local/bin/kit -> ../Cellar/kit/0.1.13/bin/kit
What are you running from argo-workflows directory? make start
? kit up
?
Please correct me where my process could be wrong:
- Modify tasks.yaml file to change "info" to "debug" for "ARGO_LOG_LEVEL" in both places
- Run "make start" or "kit up"
- tail controller.log and see "level=debug" in the log lines
It seems like the only way this can work is if the workflow-controller actually reads the environment variable $ARGO_LOG_LEVEL, which I don't think it does. Rather, I believe it can take the "--loglevel" as a command line argument.
So, does that imply that the command listed in tasks.yaml should have all of those command line arguments passed in? e.g. command: "./dist/workflow-controller --loglevel $ARGO_LOG_LEVEL"
seems to be that you need to use "ARGO_LOGLEVEL" rather than "ARGO_LOG_LEVEL", but the latter is what's used in workflows
So, not an issue?
An issue with Argo Workflows repo
ARGO_LOG_LEVEL
is used in a few places. Simple to fix if that is the case.
Guess no one expected it was a simple misconfiguration from Alex and instead thought it must've been a more complex bug somewhere ๐
Also confirmed myself that the flag is loglevel
and with the automatic env prefix, that becomes ARGO_LOGLEVEL
. I can make a quick fix for that.
Thank you both for debugging!
Raised PR to fix this in Workflows: argoproj/argo-workflows#11978
Can confirm that it is working there after the fix. Though I found another issue in Workflows that the Server currently ignores the env var for loglevel as well ๐ (similarly not a Kit issue though)